Skip to content
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.

Use IMAGE_TAG_VERSION parameter to set Image Version #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cico_build_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions openshift/mattermost-push-proxy.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -138,5 +138,6 @@ objects:
wildcardPolicy: None
status: {}
parameters:
- name: IMAGE_TAG_VERSION
value: "3.10.0"
- name: IMAGE_TAG
value: 3.10.0