Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/.ci
diff options
context:
space:
mode:
authorRobert Adam <dev@robert-adam.de>2021-01-13 12:21:48 +0300
committerGitHub <noreply@github.com>2021-01-13 12:21:48 +0300
commit3a00d3770e305136e644595ce7f5c5a80411cfe4 (patch)
treea91ed00787f88c25bc126e104fac21fdc09054db /.ci
parentffb2b70b32558c4db0619ea22a7c6865fba58dc2 (diff)
parentf0d5c0a4b50889ba321b466eda112c611718048d (diff)
Merge pull request #4677: CI(azure): Fix build number system
BUILD_NUMBER_TOKEN has to be manually exported because it's a secret variable: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables Also, the version sent to our endpoint has to be different for each job, we want the build number to increase a single time for each pipeline.
Diffstat (limited to '.ci')
-rwxr-xr-x.ci/azure-pipelines/build_linux.bash2
-rwxr-xr-x.ci/azure-pipelines/build_macos.bash2
-rw-r--r--.ci/azure-pipelines/build_windows.bat2
-rw-r--r--.ci/azure-pipelines/main.yml4
4 files changed, 7 insertions, 3 deletions
diff --git a/.ci/azure-pipelines/build_linux.bash b/.ci/azure-pipelines/build_linux.bash
index d9bcbe5ed..a1f7e9fe0 100755
--- a/.ci/azure-pipelines/build_linux.bash
+++ b/.ci/azure-pipelines/build_linux.bash
@@ -21,7 +21,7 @@
if [[ -n "$BUILD_NUMBER_TOKEN" ]]; then
VERSION=$(python "scripts/mumble-version.py" --project)
- BUILD_NUMBER=$(curl "https://mumble.info/get-build-number?version=$VERSION&token=$BUILD_NUMBER_TOKEN")
+ BUILD_NUMBER=$(curl "https://mumble.info/get-build-number?version=$VERSION_$AGENT_JOBNAME&token=$BUILD_NUMBER_TOKEN")
else
BUILD_NUMBER=0
fi
diff --git a/.ci/azure-pipelines/build_macos.bash b/.ci/azure-pipelines/build_macos.bash
index 0d711e96c..2e5f11621 100755
--- a/.ci/azure-pipelines/build_macos.bash
+++ b/.ci/azure-pipelines/build_macos.bash
@@ -32,7 +32,7 @@
if [[ -n "$BUILD_NUMBER_TOKEN" ]]; then
VERSION=$(python "scripts/mumble-version.py" --project)
- BUILD_NUMBER=$(curl "https://mumble.info/get-build-number?version=$VERSION&token=$BUILD_NUMBER_TOKEN")
+ BUILD_NUMBER=$(curl "https://mumble.info/get-build-number?version=$VERSION_$AGENT_JOBNAME&token=$BUILD_NUMBER_TOKEN")
else
BUILD_NUMBER=0
fi
diff --git a/.ci/azure-pipelines/build_windows.bat b/.ci/azure-pipelines/build_windows.bat
index 568268493..d6735f794 100644
--- a/.ci/azure-pipelines/build_windows.bat
+++ b/.ci/azure-pipelines/build_windows.bat
@@ -39,7 +39,7 @@ if defined BUILD_NUMBER_TOKEN (
:: The method we use to store a command's output into a variable:
:: https://stackoverflow.com/a/6362922
for /f "tokens=* USEBACKQ" %%g in (`python "scripts/mumble-version.py" --project`) do (set "VERSION=%%g")
- for /f "tokens=* USEBACKQ" %%g in (`curl "https://mumble.info/get-build-number?version=%VERSION%&token=%BUILD_NUMBER_TOKEN%"`) do (set "BUILD_NUMBER=%%g")
+ for /f "tokens=* USEBACKQ" %%g in (`curl "https://mumble.info/get-build-number?version=%VERSION%_%AGENT_JOBNAME%&token=%BUILD_NUMBER_TOKEN%"`) do (set "BUILD_NUMBER=%%g")
) else (
set BUILD_NUMBER=0
)
diff --git a/.ci/azure-pipelines/main.yml b/.ci/azure-pipelines/main.yml
index a9acf4177..104a1ae73 100644
--- a/.ci/azure-pipelines/main.yml
+++ b/.ci/azure-pipelines/main.yml
@@ -4,6 +4,10 @@ variables:
MUMBLE_ENVIRONMENT_PATH: '$(MUMBLE_ENVIRONMENT_STORE)/$(MUMBLE_ENVIRONMENT_VERSION)'
MUMBLE_ENVIRONMENT_TOOLCHAIN: '$(MUMBLE_ENVIRONMENT_PATH)/scripts/buildsystems/vcpkg.cmake'
+env:
+ # Secret variable, has to be exported manually.
+ BUILD_NUMBER_TOKEN: $(BUILD_NUMBER_TOKEN)
+
jobs:
- job: Windows_x86_64
displayName: Windows (x86_64)