JenkinsDocker/deploy
2021-04-13 17:18:20 +06:00

19 lines
543 B
Bash
Executable File

#!/bin/bash
function assert_success() {
"${@}"
local status=${?}
if [ ${status} -ne 0 ]; then
echo "### Error ${status} at: ${BASH_LINENO[*]} ###"
exit ${status}
fi
}
version="2.277.2"
assert_success docker build -t jenkins:$version ./
assert_success docker tag jenkins:$version insanusmokrassar/jenkins:$version
assert_success docker tag jenkins:$version insanusmokrassar/jenkins:latest
assert_success docker push insanusmokrassar/jenkins:$version
assert_success docker push insanusmokrassar/jenkins:latest