[APM-CI] Use withSecretVault step
@@ -308,14 +308,8 @@ def runScript(Map params = [:]){
}
def releasePackages(){
- def jsonValue = getVaultSecret(secret: 'secret/apm-team/ci/apm-agent-python-twine')
- wrap([$class: 'MaskPasswordsBuildWrapper', varPasswordPairs: [
- [var: 'TWINE_USER', password: jsonValue.data.user],
- [var: 'TWINE_PASSWORD', password: jsonValue.data.password],
- ]]) {
- withEnv([
- "TWINE_USER=${jsonValue.data.user}",
- "TWINE_PASSWORD=${jsonValue.data.password}"]) {
+ withSecretVault(secret: 'secret/apm-team/ci/apm-agent-python-twine',
+ user_var_name: 'TWINE_USER', pass_var_name: 'TWINE_PASSWORD'){
sh(label: "Release packages", script: """
set +x
python -m pip install --user twine
@@ -326,4 +320,3 @@ def releasePackages(){
""")
}
}
-}
