mirror of
https://github.com/git/git.git
synced 2026-01-18 06:34:21 +00:00
ci/lib.sh: add support for Azure Pipelines
This patch introduces a conditional arm that defines some environment variables and a function that displays the URL given the job id (to identify previous runs for known-good trees). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
23
ci/lib.sh
23
ci/lib.sh
@@ -19,6 +19,29 @@ then
|
||||
BREW_INSTALL_PACKAGES="git-lfs gettext"
|
||||
export GIT_PROVE_OPTS="--timer --jobs 3 --state=failed,slow,save"
|
||||
export GIT_TEST_OPTS="--verbose-log -x --immediate"
|
||||
elif test -n "$SYSTEM_TASKDEFINITIONSURI"
|
||||
then
|
||||
# We are running in Azure Pipelines
|
||||
CI_BRANCH="$BUILD_SOURCEBRANCH"
|
||||
CI_COMMIT="$BUILD_SOURCEVERSION"
|
||||
CI_JOB_ID="$BUILD_BUILDID"
|
||||
CI_JOB_NUMBER="$BUILD_BUILDNUMBER"
|
||||
CI_OS_NAME="$(echo "$AGENT_OS" | tr A-Z a-z)"
|
||||
test darwin != "$CI_OS_NAME" || CI_OS_NAME=osx
|
||||
CI_REPO_SLUG="$(expr "$BUILD_REPOSITORY_URI" : '.*/\([^/]*/[^/]*\)$')"
|
||||
CC="${CC:-gcc}"
|
||||
|
||||
# use a subdirectory of the cache dir (because the file share is shared
|
||||
# among *all* phases)
|
||||
cache_dir="$HOME/test-cache/$SYSTEM_PHASENAME"
|
||||
|
||||
url_for_job_id () {
|
||||
echo "$SYSTEM_TASKDEFINITIONSURI$SYSTEM_TEAMPROJECT/_build/results?buildId=$1"
|
||||
}
|
||||
|
||||
BREW_INSTALL_PACKAGES=
|
||||
export GIT_PROVE_OPTS="--timer --jobs 10 --state=failed,slow,save"
|
||||
export GIT_TEST_OPTS="--quiet --write-junit-xml"
|
||||
fi
|
||||
|
||||
skip_branch_tip_with_tag () {
|
||||
|
||||
Reference in New Issue
Block a user