mirror of
https://github.com/InsanusMokrassar/JenkinsDocker.git
synced 2024-11-23 03:08:43 +00:00
20 lines
599 B
Plaintext
20 lines
599 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
function assert_success() {
|
||
|
"${@}"
|
||
|
local status=${?}
|
||
|
if [ ${status} -ne 0 ]; then
|
||
|
echo "### Error ${status} at: ${BASH_LINENO[*]} ###"
|
||
|
exit ${status}
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
version="5.38.0"
|
||
|
image_name=jenkins-ssh-agent
|
||
|
|
||
|
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
|