github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/gitlab/yaml/testdata/job_keywords/when/example-1.yaml (about)

     1  # https://docs.gitlab.com/ee/ci/yaml/#when
     2  
     3  stages:
     4    - build
     5    - cleanup_build
     6    - test
     7    - deploy
     8    - cleanup
     9  
    10  build_job:
    11    stage: build
    12    script:
    13      - make build
    14  
    15  cleanup_build_job:
    16    stage: cleanup_build
    17    script:
    18      - cleanup build when failed
    19    when: on_failure
    20  
    21  test_job:
    22    stage: test
    23    script:
    24      - make test
    25  
    26  deploy_job:
    27    stage: deploy
    28    script:
    29      - make deploy
    30    when: manual
    31    environment: production
    32  
    33  cleanup_job:
    34    stage: cleanup
    35    script:
    36      - cleanup after jobs
    37    when: always