Created
July 31, 2018 14:31
-
-
Save aserrallerios/4aceebd057545b21447abbab25c84b17 to your computer and use it in GitHub Desktop.
spinnaker expression language example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"application_name": "${execution['application']}", | |
"config_url": "${ trigger.artifacts.?[type == 'app-config']. size() > 1 ? trigger.artifacts.?[type == 'app-config'].?[name matches 'dev-\\w+'].![reference][0] : trigger.artifacts.^[type == 'app-config'][reference] }", | |
"image": "${trigger.artifacts.^[type == 'docker'].reference}", | |
"namespace": "dev", | |
"raw_tags": { | |
"spinnaker.io/application": "${ execution['application'] }", | |
"spinnaker.io/cluster": "${execution['application']}", | |
"spinnaker.io/detail": "test", | |
"spinnaker.io/stack": "${execution['application']}" | |
}, | |
"spinnaker_tags": { | |
"branch": "${trigger.buildInfo.scm[0].branch}", | |
"buildNumber": "${trigger.buildInfo.number}", | |
"commit": "${trigger.buildInfo.scm[0].sha1}", | |
"compareUrl": "${trigger.buildInfo.scm[0].compareUrl}", | |
"pipelineExecutionId": "${execution.id}", | |
"repoName": "${trigger.buildInfo.scm[0].name}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment