1

I have the following syntax in a gitlab-ci.yml file.

what is the meaning of &default in this

.default:
  only: &default
    - master
    - dev
    - merge_requests

........

code-check:
  stage: lint
  script:
    - pip install black
    - black .
    - black --check .
    - black --include \.pyi?$ .
    - black --exclude \.git\.venv .
    - black --line-length 88 .
  allow_failure: true
  only: *default

Santhosh
  • 9,965
  • 20
  • 103
  • 243
  • 4
    Does this answer your question? [What do the &,<<, \* mean in this database.yml file?](https://stackoverflow.com/questions/6651275/what-do-the-mean-in-this-database-yml-file) Specifically, take a look at [this answer](https://stackoverflow.com/a/6651423/16886597). For future reference, I found this by using the [SymbolHound search engine to search for `&default`](http://symbolhound.com/?q=%26default). SymbolHound is specifically designed for search queries containing symbols, like `&default`. – cocomac Nov 03 '21 at 04:17

0 Answers0