move scripts to toolchain-scripts
publish.sh
deleted
100755 → 0
#!/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 |
Please register or sign in to comment