Ygor
Ygor

Reputation: 310

Share gitlab CI/CD variables between projects

I have a project that implements a shared CI library and other projects include it in their .gitlab-ci.yml files. Also, all these projects share the same service account that is added as CI/CD variables to each project that wants to include the library.

I tried to set this service account as a CI/CD variable in the library project, but I can not share it with the projects consuming this library.

All these projects are in different groups and, at least until now, there is no need to move them. Is there another way to share service accounts/ API keys among different projects consuming a CI library?

Upvotes: 4

Views: 4524

Answers (1)

snim2
snim2

Reputation: 4079

If you are using your own runners, then possibly.

If not, you might be able to write some tooling to retrieve the variables via the API.

Upvotes: 2

Related Questions