Commit d7b4b86e authored by Cooper, Caleb's avatar Cooper, Caleb
Browse files

Update rse-bash-modules.sh

parent d9110cc9
...@@ -20,4 +20,17 @@ func_rse_docker_build_push() { ...@@ -20,4 +20,17 @@ func_rse_docker_build_push() {
docker build -t ${CI_REGISTRY}/${CI_PROJECT_PATH}${TAG}/${COMMIT_REF} . docker build -t ${CI_REGISTRY}/${CI_PROJECT_PATH}${TAG}/${COMMIT_REF} .
docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY docker login --username=$CI_REGISTRY_USER --password=$CI_REGISTRY_PASSWORD $CI_REGISTRY
docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}${TAG}/${COMMIT_REF} docker push ${CI_REGISTRY}/${CI_PROJECT_PATH}${TAG}/${COMMIT_REF}
}
func_rse_make_sudo_account() {
NEW_ACCOUNT="{1}"
NEW_PASS="${2}"
if [[ ! "$(getent passwd ${NEW_ACCOUNT})" ]]; then
NEW_UID=70000
while [[ "$(getent passwd ${NEW_UID})" ]]; do
NEW_UID=$((NEW_UID + 1))
done
sudo useradd -u ${NEW_UID} -s /bin/bash -m -G wheel ${NEW_ACCOUNT} || true
fi
echo -e "${NEW_PASS}\n${NEW_PASS}" | sudo passwd ${NEW_ACCOUNT}
} }
\ No newline at end of file
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