|
113 | 113 |
|
114 | 114 | docker info |
115 | 115 |
|
| 116 | + # Disable xtrace so the expanded secret values aren't printed to |
| 117 | + # the build log. |
| 118 | + set +x |
| 119 | + export GPG_KEY_PASSPHRASE="${bamboo_gpgPassword}" |
| 120 | + export GPG_SECRET_KEY="${bamboo_gpgSecretKeyPart1}${bamboo_gpgSecretKeyPart2}" |
| 121 | + export SIGNER_API_KEY="${bamboo_adguardHomeWinSignerSecretApiKey}" |
| 122 | + set -x |
| 123 | +
|
116 | 124 | docker build \ |
117 | 125 | --build-arg "BASE_IMAGE=${bamboo_dockerGo}" \ |
118 | 126 | --build-arg "BRANCH=${bamboo_planRepository_branchName}" \ |
119 | 127 | --build-arg "CACHE_BUSTER=${bamboo_cacheBuster}" \ |
120 | 128 | --build-arg "CHANNEL=${bamboo_channel}" \ |
121 | 129 | --build-arg "DEPLOY_SCRIPT_PATH=./bamboo-deploy-publisher/deploy.sh" \ |
122 | | - --build-arg "GPG_SECRET_KEY=${bamboo_gpgSecretKeyPart1}${bamboo_gpgSecretKeyPart2}" \ |
123 | | - --build-arg "GPG_KEY_PASSPHRASE=${bamboo_gpgPassword}" \ |
124 | 130 | --build-arg "REVISION=${bamboo_repository_revision_number}" \ |
125 | 131 | --build-arg "SIGN=1" \ |
126 | | - --build-arg "SIGNER_API_KEY=${bamboo_adguardHomeWinSignerSecretApiKey}" \ |
127 | 132 | --build-arg "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" \ |
128 | 133 | --build-arg "VERSION=$version" \ |
129 | 134 | --output '.' \ |
130 | 135 | --progress 'plain' \ |
| 136 | + --secret id=GPG_KEY_PASSPHRASE \ |
| 137 | + --secret id=GPG_SECRET_KEY \ |
| 138 | + --secret id=SIGNER_API_KEY \ |
131 | 139 | --target 'builder-exporter' \ |
132 | 140 | -f ./docker/ci.Dockerfile \ |
133 | 141 | . |
|
151 | 159 |
|
152 | 160 | set -e -f -u -x |
153 | 161 |
|
| 162 | + # The version.sh script queries the current state of the git |
| 163 | + # repository, so we must explicitly checkout the revision that |
| 164 | + # triggered the build to prevent race conditions when the master |
| 165 | + # branch changes while this build is running. |
| 166 | + git checkout "${bamboo_repository_revision_number}" |
| 167 | +
|
154 | 168 | # Install Qemu, create builder. |
155 | 169 | docker version -f '{{ .Server.Experimental }}' |
156 | 170 | docker buildx rm buildx-builder || : |
|
0 commit comments