JenkinsDocker/ssh-agent/deploy

20 lines
599 B
Plaintext
Raw Normal View History

#!/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