Last active
November 16, 2018 12:57
-
-
Save bondarewicz/9f66f764cb6240de7576b90de968c8aa to your computer and use it in GitHub Desktop.
k8s git namespace
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT_NAME="$(basename -s .git `git config --get remote.origin.url` | tr "[:upper:]" "[:lower:]")" | REV="$(git rev-parse --short HEAD)" | BRANCH="$(git branch | grep \* | cut -d ' ' -f2 )" | sed -i "" "s/{{namespace}}/${PROJECT_NAME}-${BRANCH}-sha.${REV}/g" file.yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment