db-gateway/configuration/scripts/mapVarsToConfigs.sh

14 lines
658 B
Bash
Executable File

#!/usr/bin/env bash
DOCKER_REPOSITORY=$1
APPLICATION_NAME=$2
APPLICATION_VERSION=$3
APPLICATION_LABEL=$4
sh "sed -i 's/REPOSITORY/${DOCKER_REPOSITORY}/g' configuration/kubernetes/deployment.yaml"
sh "sed -i 's/IMAGE/${APPLICATION_NAME}:${APPLICATION_VERSION}/g' configuration/kubernetes/deployment.yaml"
sh "sed -i 's/RESOURCE_NAME/${APPLICATION_NAME}/g' configuration/kubernetes/deployment.yaml"
sh "sed -i 's/LABEL/${APPLICATION_LABEL}/g' configuration/kubernetes/deployment.yaml"
sh "sed -i 's/RESOURCE_NAME/${APPLICATION_NAME}/g' configuration/kubernetes/service.yaml"
sh "sed -i 's/LABEL/${APPLICATION_LABEL}/g' configuration/kubernetes/service.yaml"