Search code examples
gitlabcontinuous-integrationyamlflagscicd

How to use GITLAB feature flag to run jobs of same stage sequentially in CI yml file


In my project I want to run jobs of the same stage sequentially due to Hardware dependency. The different stages are:

stages:

  • build
  • build install
  • test

In the test stage I would like to run tests sequentially instead of the general parallel execution. According to the merge request mentioned here the flag Feature.enable(:ci_same_stage_job_needs) can be used to let needs consider a job from the same stage as dependency.

I am facing an issue in declaring this flag in the CI. Is it possible to use this flag in the CI job ? Am I using it wrong ? If it is possible, where and how should I use it ?

Thanks.


Solution

  • From the issue you linked, this feature has been merged into the master branch, but hasn't been released. The latest available version is 14.1.3, and according to the issue this functionality and feature flag will be released in 14.2.