Home > front end >  Gitlab CI failure but continue to run problem
Gitlab CI failure but continue to run problem

Time:08-29

In gitLab, I create CI to build the project, for each stage I have 2 job seperately

Build BookProject:
  stage: build  
  <<: *dotnetbuild_job 
  when: manual 
 
Build ShopProject:
  stage: build
  <<: *dotnetbuild_job
  when: manual

Deploy BookProject:
  stage: Deploy 
  needs: ["Build BookProject"]
  <<: *dotnetdeploy_job 
  when: on_success 
 
Deploy ShopProject:
  stage: Deploy
  needs: ["Build ShopProject"]
  <<: *dotnetdeploy_job
  when: on_success

I find that when Build BookProject: job return ERROR: Job failed: exit code 1, which the job icon show !, the Deploy BookProject: are still continue to run, even I set when: on_success, can I know how to prevent it ?

CodePudding user response:

When jobs specify when: manual, it implies allow_failure: true.

To avoid this behavior, specify allow_failure: false on your manual build jobs.

  • Related