diff --git a/example.yml b/example.yml index e69de29..2acd4ed 100644 --- a/example.yml +++ b/example.yml @@ -0,0 +1,22 @@ +steps: + GetJiraID: + title: Get Jira ID + image: alpine:latest + commands: + - echo JIRAID=$(echo "${{CF_COMMIT_MESSAGE}}" |sed -e 's/\([A-Z]*-[0-9]*\).*/\1/') > ${{CF_VOLUME_PATH}}/env_vars_to_export + BuildingDockerImage: + title: Building Docker Image + type: build + image_name: otomato/bringon + working_directory: ./ + dockerfile: Dockerfile + tag: '${{CF_SHORT_REVISION}}' + UpdatingJira: + title: Update Jira Issue + image: otomato/jira-cli:alpine + commands: + - yes n | jira-cli update ${JIRAID} --comment 'New docker image otomato/bringon:${{CF_SHORT_REVISION}}. Build log is here ${{CF_BUILD_URL}}' --jira-url ${JIRA_URL} -u ${JIRA_USR} -p ${JIRA_PWD} + when: + condition: + all: + JiraIdFound: 'match("${JIRAID}", "[A-Z]+-[0-9]+", true)'