mirror of
https://github.com/InsanusMokrassar/JenkinsDocker.git
synced 2024-11-18 00:53:47 +00:00
20 lines
590 B
Bash
Executable File
20 lines
590 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.426.1"
|
|
image_name=jenkins
|
|
|
|
assert_success docker build -t $image_name:$version ./
|
|
assert_success docker tag $image_name:$version insanusmokrassar/$image_name:$version
|
|
assert_success docker tag $image_name:$version insanusmokrassar/$image_name:latest
|
|
assert_success docker push insanusmokrassar/$image_name:$version
|
|
assert_success docker push insanusmokrassar/$image_name:latest
|