GitLab CI - if variable exists set variable -


i'd set dash plus repo tag docker image build if build build of tag, , neither if not, i'll explain...

this trivial if wanted set tag if existed because work:

build-nginx:   stage: build-nginx   script:     - command docker build -t $ci_registry_image:nginx$ci_commit_tag .     - command docker push $ci_registry_image:nginx$ci_commit_tag 

this create registry.example.com/image:nginx if there no tag , registry.example.com/image:nginx1.0 if there was, how image named registry.example.com/image:nginx-1.0 (with dash), i've have check if tag variable set otherwise i'd end , image called registry.example.com/image:nginx- if tag variable not set.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -