Commit 39b9f944 authored by Cooper, Caleb's avatar Cooper, Caleb
Browse files

Update rse-bash-modules.sh

parent 6b4f3b0a
......@@ -30,6 +30,22 @@ func_rse_docker_build_push() {
docker push ${CI_REGISTRY,,}/${CI_PROJECT_PATH,,}${TAG,,}${COMMIT_REF,,}
}
func_rse_docker_pull_self() {
while getopts ":t:" opt; do
case ${opt} in
t) TAG="/${OPTARG}";;
esac
done
COMMIT_REF=$(echo "$CI_COMMIT_REF_NAME" | tr '[:upper:]' '[:lower:]' | tr '/' '_' | sed -e 's/^master$/latest/')
if [[ ${COMMIT_REF} = 'latest' ]]; then
COMMIT_REF=":${COMMIT_REF}"
else
COMMIT_REF="/${COMMIT_REF}"
fi
docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
docker pull -t ${CI_REGISTRY,,}/${CI_PROJECT_PATH,,}${TAG,,}${COMMIT_REF,,}
}
func_rse_make_sudo_account() {
set -x
NEW_ACCOUNT="${1}"
......
Markdown is supported
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