From 0493747f5d1b30008b4170b3d48080abfa224700 Mon Sep 17 00:00:00 2001 From: ckonstanski Date: Tue, 24 Oct 2017 18:27:27 -0600 Subject: make it work for all 4 git branches --- salt/openbook/ci/files/build.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'salt/openbook/ci') diff --git a/salt/openbook/ci/files/build.sh b/salt/openbook/ci/files/build.sh index 3faef38..abcba51 100644 --- a/salt/openbook/ci/files/build.sh +++ b/salt/openbook/ci/files/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +artifact="${1}" + for i in $(docker images | grep -v CREATED | awk '{print $3}'); do docker rmi --force $i done @@ -16,19 +18,19 @@ docker login --username {{ pillar["registry"]["username"] }} --password {{ pilla # curl -u '{{ pillar["registry"]["username"] }}:{{ pillar["registry"]["password"] }}' -X DELETE https://{{ pillar["registry"]["url"] }}/v2/${i}/manifests/${digest} # done -if [ "${1}" == "database" ]; then +if [ "${artifact}" == "database" ]; then {{ pillar["database"]["build_dir"] }}/build.sh -elif [ "${1}" == "admin-api-server" ]; then +elif [ "${artifact}" == "admin-api-server" ]; then {{ pillar["admin_api_server"]["build_dir"] }}/build.sh -elif [ "${1}" == "customer-api-server" ]; then +elif [ "${artifact}" == "customer-api-server" ]; then {{ pillar["customer_api_server"]["build_dir"] }}/build.sh -elif [ "${1}" == "admin-web-ui" ]; then +elif [ "${artifact}" == "admin-web-ui" ]; then {{ pillar["admin_web_ui"]["build_dir"] }}/build.sh -elif [ "${1}" == "customer-web-ui" ]; then +elif [ "${artifact}" == "customer-web-ui" ]; then {{ pillar["customer_web_ui"]["build_dir"] }}/build.sh -elif [ "${1}" == "job-scheduler-server" ]; then +elif [ "${artifact}" == "job-scheduler-server" ]; then {{ pillar["job_scheduler_server"]["build_dir"] }}/build.sh -elif [ "${1}" == "workflow-server" ]; then +elif [ "${artifact}" == "workflow-server" ]; then {{ pillar["workflow_server"]["build_dir"] }}/build.sh else {{ pillar["database"]["build_dir"] }}/build.sh -- cgit v1.3