Skip to content

Instantly share code, notes, and snippets.

@aserrallerios
Created July 31, 2018 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aserrallerios/4aceebd057545b21447abbab25c84b17 to your computer and use it in GitHub Desktop.
Save aserrallerios/4aceebd057545b21447abbab25c84b17 to your computer and use it in GitHub Desktop.
spinnaker expression language example
{
"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