Skip to content

Commit e02641f

Browse files
authored
use different secrets for pypi prod and test (#566)
This allows us to use token authentication, as tokens differ for test and prod
1 parent 9e50016 commit e02641f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.ci/Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def generateStep(version){
188188
}
189189

190190
def releasePackages(){
191-
withSecretVault(secret: 'secret/apm-team/ci/apm-agent-python-twine',
191+
def vault_secret = (env.REPO_URL == 'https://upload.pypi.org/legacy/') ? 'secret/apm-team/ci/apm-agent-python-pypi-prod' : 'secret/apm-team/ci/apm-agent-python-pypi-test'
192+
withSecretVault(secret: vault_secret,
192193
user_var_name: 'TWINE_USER', pass_var_name: 'TWINE_PASSWORD'){
193194
sh(label: "Release packages", script: """
194195
set +x

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ def runScript(Map params = [:]){
302302
}
303303

304304
def releasePackages(){
305-
withSecretVault(secret: 'secret/apm-team/ci/apm-agent-python-twine',
305+
def vault_secret = (env.REPO_URL == 'https://upload.pypi.org/legacy/') ? 'secret/apm-team/ci/apm-agent-python-pypi-prod' : 'secret/apm-team/ci/apm-agent-python-pypi-test'
306+
withSecretVault(secret: vault_secret,
306307
user_var_name: 'TWINE_USER', pass_var_name: 'TWINE_PASSWORD'){
307308
sh(label: "Release packages", script: """
308309
set +x

0 commit comments

Comments
 (0)