1

Is the list value build:image just a name like build_image? Or does it have special usage in either the yaml file or the .gitlab-ci.yml file? If there isn't a special usage, what is the value of using name1:name2 instead of name1_name2?

The :image doesn't seem to be put into a variable. When I run this through the gitlab pipeline, the output is

Skipping Git submodules setup
Restoring cache
Downloading artifacts
Running before_script and script
$ echo image is $image
image
is

.gitlab-ci.yml

stages:
  - build:image
  - tag:image
  - deploy
build:
    stage: build:image
    script:
        - echo image is $image
maogenc
  • 203
  • 7
  • 13

1 Answers1

1

I don't see anything like this in the GitLab CI/CD Pipeline Configuration Reference

Where did you see this .gitlab-ci.yml file?

I ran the .gitlab-ci.yml you provided and it seems to work fine, apparently GitLab CI doesn't treat the colon in any special way -- and I wouldn't expect it to, as there is no mention of it in the documentation.

Aleksey Tsalolikhin
  • 1,518
  • 7
  • 14
  • 1
    This was simplified from an existing gitlab project at work. I was just double-checking to see if I was peering into arcane yaml dark arts. – maogenc Apr 20 '20 at 20:23