Phanindra kumar
Phanindra kumar

Reputation: 70

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:

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.

Upvotes: 0

Views: 999

Answers (2)

Emmanuel Iturbide
Emmanuel Iturbide

Reputation: 69

A feature flag can be enable by a Gitlab Administrator:

https://docs.gitlab.com/ee/administration/feature_flags.html

For Omnibus installations:

sudo gitlab-rails console

For installations from the source:

sudo -u git -H bundle exec rails console -e production

To enable a feature, run:

Feature.enable(:<feature flag>)

In your case:

Feature.enable(:ci_same_stage_job_needs)

Upvotes: 1

Adam Marshall
Adam Marshall

Reputation: 7705

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.

Upvotes: 1

Related Questions