mirror of
https://github.com/InsanusMokrassar/JenkinsDocker.git
synced 2024-11-26 04:38:42 +00:00
20 lines
599 B
Bash
Executable File
20 lines
599 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="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
|