File tree 2 files changed +41
-1
lines changed
2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -54,4 +54,6 @@ promote_task:
54
54
GITHUB_TOKEN : VAULT[development/github/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promotion token]
55
55
ARTIFACTS : sonar-summy-python-oss
56
56
<< : *POETRY_TEMPLATE
57
- promote_script : .cirrus/cirrus_promote_python
57
+ promote_script :
58
+ - source .cirrus/cirrus-env PROMOTE
59
+ - .cirrus/cirrus_promote_python
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set +o verbose
4
+ set -euo pipefail
5
+
6
+ # generic environment variables used by Gradle build
7
+ export GIT_SHA1=$CIRRUS_CHANGE_IN_REPO
8
+ export GITHUB_BASE_BRANCH=${CIRRUS_BASE_BRANCH:- }
9
+ export GITHUB_BRANCH=$CIRRUS_BRANCH
10
+ export GITHUB_REPO=${CIRRUS_REPO_FULL_NAME}
11
+ export PROJECT=${CIRRUS_REPO_NAME}
12
+ export PULL_REQUEST=${CIRRUS_PR:- false}
13
+ export PULL_REQUEST_SHA=${CIRRUS_BASE_SHA:- }
14
+ # used by burgr to identify stages of the pipeline
15
+ export PIPELINE_ID=${CIRRUS_BUILD_ID}
16
+
17
+ export LANG=C.UTF-8
18
+
19
+ TASK_TYPE=$1
20
+ if [[ " $TASK_TYPE " != " BUILD" * ]]; then
21
+ export SONARSOURCE_QA=true
22
+ fi
23
+
24
+ : " ${CI_BUILD_NUMBER?missing parameter. See https:// xtranet-sonarsource.atlassian.net/ wiki/ spaces/ RE/ pages/ 2992210934} "
25
+ BUILD_NUMBER=${CI_BUILD_NUMBER}
26
+ BUILD_ID=${CI_BUILD_NUMBER}
27
+ echo " BUILD_NUMBER: $BUILD_NUMBER "
28
+ export BUILD_NUMBER BUILD_ID
29
+
30
+ if [[ " ${GITHUB_TOKEN:- } " == " ENCRYPTED" * ]]; then
31
+ echo " Unsetting GITHUB_TOKEN"
32
+ unset GITHUB_TOKEN
33
+ fi
34
+
35
+ case $BUILD_ID in
36
+ ' ' |* [!0-9]* ) echo " $BUILD_ID is not a number" && exit 1 ;;
37
+ esac
38
+ set -o verbose
You can’t perform that action at this time.
0 commit comments