JenkinsDocker/deploy

20 lines
590 B
Plaintext
Raw Permalink Normal View History

2020-06-04 18:56:10 +00:00
#!/bin/bash
function assert_success() {
"${@}"
local status=${?}
if [ ${status} -ne 0 ]; then
echo "### Error ${status} at: ${BASH_LINENO[*]} ###"
exit ${status}
fi
}
2023-11-26 15:02:37 +00:00
version="2.426.1"
image_name=jenkins
2020-06-04 18:56:10 +00:00
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