Skip to content

Commit

Permalink
feat: print intention close result to show audit url in log (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbystedt authored Dec 5, 2023
1 parent 374990d commit fbab805
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions pipelines/shared/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pipeline {
intention.endAction("install")
vault.revokeToken()
intention.endAction("login")
intention.close(true)
println intention.close(true)
intention = null
} catch (IllegalStateException ex) {
echo "IllegalStateException occurred: $ex"
Expand Down Expand Up @@ -236,7 +236,7 @@ pipeline {
intention.endAction("install")
vault.revokeToken()
intention.endAction("login")
intention.close(true)
println intention.close(true)
intention = null
} catch (IllegalStateException ex) {
echo "IllegalStateException occurred: $ex"
Expand Down Expand Up @@ -330,8 +330,8 @@ pipeline {
intention.startAction("configure")
def vaultAppToken = intention.provisionToken("configure", APP_ROLE_ID)
def vaultApp = new Vault(vaultAppToken)
vaultApp.readToObject("apps/data/prod/${env.PROJECT}/${env.COMPONENT}/production", env, keyTransform: { key -> 'PODMAN_' + key})
vaultApp.revokeToken()
vaultApp.readToObject("apps/data/prod/${env.PROJECT}/${env.COMPONENT}/production", env, keyTransform: { key -> 'PODMAN_' + key})
vaultApp.revokeToken()
intention.endAction("configure")
intention.startAction("install")
podman = new Podman(this)
Expand All @@ -353,8 +353,7 @@ pipeline {
intention.endAction("install")
vault.revokeToken()
intention.endAction("login")
def auditUrl = intention.close(true)
println auditUrl
println intention.close(true)
} catch (IllegalStateException ex) {
echo "IllegalStateException occurred: $ex"
currentBuild.result = 'ABORTED'
Expand All @@ -377,7 +376,7 @@ pipeline {
node(Podman.AGENT_LABEL_APP) {
script {
if (intention) {
intention.close(false)
println intention.close(false)
}
}
}
Expand All @@ -386,7 +385,7 @@ pipeline {
node(Podman.AGENT_LABEL_APP) {
script {
if (intention) {
intention.close(false)
println intention.close(false)
}
}
}
Expand All @@ -395,8 +394,7 @@ pipeline {
node(Podman.AGENT_LABEL_APP) {
script {
if (intention) {
def auditUrl = intention.close(true)
println auditUrl
println intention.close(true)
}
}
}
Expand Down

0 comments on commit fbab805

Please sign in to comment.