Commit 0a29ebf7 authored by Frederic Lavigne's avatar Frederic Lavigne
Browse files

move scripts to toolchain-scripts

parent afcfbb82
#!/bin/bash
env
# inject variables into chart values.yaml
# repository: $IMAGE_NAME
IMAGE_REPOSITORY=${REGISTRY_URL}/${REGISTRY_NAMESPACE}/${IMAGE_NAME}
ESCAPED_IMAGE_REPOSITORY=$(echo $IMAGE_REPOSITORY | sed 's/\//\\\//g')
sed -i 's/repository: '$IMAGE_NAME'/repository: '$ESCAPED_IMAGE_REPOSITORY'/g' chart/*/values.yaml
# tag: 1
sed -i 's/tag: 1/tag: '$BUILD_NUMBER'/g' chart/*/values.yaml
echo "Chart values after substitutions:"
cat chart/*/values.yaml
# helm package
helm init --client-only
helm package chart/*
# git clone solution
git config --global user.email "[email protected]"
git config --global user.name "Automatic Build"
git config --global push.default simple
git clone "https://oauth2:$GITLAB_KEY@git.eu-de.bluemix.net/umbrella-chart/solution.git"
# copy to charts
mkdir -p solution/charts
cp -f *.tgz solution/charts
# commit the new chart
cd solution
git add .
git status
git commit -m 'new module build'
git push
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment