Commit ca81a464 authored by Cooper, Caleb's avatar Cooper, Caleb

Update rse-bash-modules.sh

parent b48e63dd
......@@ -15,11 +15,11 @@ func_rse_docker_cleanup() {
if [[ ! 'docker' =~ $(groups) ]]; then
sudo usermod -a -G docker "${USER}"
fi
docker stop $(docker ps -aq) 2>/dev/null || true
docker rm $(docker ps -a -q) 2>/dev/null|| true
docker rmi $(docker images -q) 2>/dev/null || true
docker image prune -fa || sudo systemctl restart docker
docker system prune -fa || sudo systemctl restart docker
sudo docker stop $(docker ps -aq) 2>/dev/null || true
sudo docker rm $(docker ps -a -q) 2>/dev/null|| true
sudo docker rmi $(docker images -q) 2>/dev/null || true
sudo docker image prune -fa || sudo systemctl restart docker
sudo docker system prune -fa || sudo systemctl restart docker
}
func_rse_docker_build_push() {
......@@ -36,9 +36,9 @@ func_rse_docker_build_push() {
else
COMMIT_REF="/${COMMIT_REF}"
fi
docker build -f "${FILE}" -t ${CI_REGISTRY,,}/${CI_PROJECT_PATH,,}${TAG,,}${COMMIT_REF,,} .
docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
docker push ${CI_REGISTRY,,}/${CI_PROJECT_PATH,,}${TAG,,}${COMMIT_REF,,}
sudo docker build -f "${FILE}" -t ${CI_REGISTRY,,}/${CI_PROJECT_PATH,,}${TAG,,}${COMMIT_REF,,} .
sudo docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
sudo docker push ${CI_REGISTRY,,}/${CI_PROJECT_PATH,,}${TAG,,}${COMMIT_REF,,}
}
func_rse_docker_pull_self() {
......@@ -53,8 +53,8 @@ func_rse_docker_pull_self() {
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,,}
sudo docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
sudo docker pull -t ${CI_REGISTRY,,}/${CI_PROJECT_PATH,,}${TAG,,}${COMMIT_REF,,}
}
func_rse_make_sudo_account() {
......
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