Is it possible to use environment variables in needs for gitlab ci/cd?

Is it possible to use environment varialbes defined in the project scope as the name of a job passed to the needs keyword in gitlab ci/cd ?

Here is what I’m trying to do :

      - job: $DEPLOYMENT_JOB

NB: I’m using the version 13.9 of giltab community edition

Hi @anaymane
this is currently not possible. You can see supported places here

Thank you for your answer, otherwise, is there a way to retrieve the state of a previous job (knowing if it has failed or succeeded) without using the needs keyword ?

If the previous job fails the one that needs it won’t start.

the problem is that the job that I want to track has an allow_failure to true, this is why I can’t get the info using this process

I am not aware of any quick feature that would do what you need. I guess you have to do couple of API requests to get status of the job.

1 Like

Ohh I see, Hope that they will include this feature in future releases