diff --git a/cico_build_deploy.sh b/cico_build_deploy.sh index e4ac584..79f38f2 100644 --- a/cico_build_deploy.sh +++ b/cico_build_deploy.sh @@ -16,7 +16,7 @@ TEMPLATE="openshift/mattermost-push-proxy.app.yaml" #Find tag used by deployment template echo -e "Scanning OpenShift Deployment Template for Image tag" -TAG=$(cat $TEMPLATE | grep -o -e "registry.*" | awk '{split($0,array,"/")} END{print array[3]}' | awk '{split($0,array,":")} END{print array[2]}') +TAG=$(cat $TEMPLATE | grep -A 1 "name: IMAGE_TAG_VERSION" | grep "value:" | awk '{split($0,array,":")} END{print array[2]}') #Check if image is in the registry echo -e "Checking if image exists on the registry" diff --git a/openshift/mattermost-push-proxy.app.yaml b/openshift/mattermost-push-proxy.app.yaml index bc29d07..2f890fc 100644 --- a/openshift/mattermost-push-proxy.app.yaml +++ b/openshift/mattermost-push-proxy.app.yaml @@ -34,7 +34,7 @@ objects: service: mattermost-push-proxy spec: containers: - - image: registry.centos.org/mattermost/mattermost-push-proxy:${IMAGE_TAG} + - image: registry.centos.org/mattermost/mattermost-push-proxy:${IMAGE_TAG_VERSION} imagePullPolicy: Always name: mattermost-push-proxy ports: @@ -138,5 +138,6 @@ objects: wildcardPolicy: None status: {} parameters: +- name: IMAGE_TAG_VERSION + value: "3.10.0" - name: IMAGE_TAG - value: 3.10.0