Commit 742e4d98 authored by Emeric Verschuur's avatar Emeric Verschuur

Add dockerimg module

parent 258c1bf8
citbx_module_dockerimg_define() {
local prj_name=$(git remote -v \
| gawk '
match($0, /^origin\s.*:[\/]*(.*)\.git\s.*$/, ret) {
print ret[1];
exit;
}
match($0, /^origin\s.*:[\/]*(.*)\s.*$/, ret) {
print ret[1];
exit;
}')
local declare_opts=()
if [ -n "$prj_name" ]; then
declare_opts+=(-e "\"\$CI_REGISTRY/$prj_name\"")
fi
bashopts_declare -n CI_REGISTRY_IMAGE -l image-name -d "Registry image name" -t string "${declare_opts[@]}"
bashopts_declare -n CI_COMMIT_TAG -l image-tag -d "Image tag" -t string -v "test"
CITBX_UID=0
CITBX_JOB_SHELL=${CITBX_JOB_SHELL:-/bin/sh}
citbx_export CI_REGISTRY_IMAGE CI_COMMIT_TAG
}
citbx_module_dockerimg_setup() {
bashopts_process_option -n CI_REGISTRY_IMAGE -r
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment