I have a nodejs repository in gitlab service and I use gitlab CI runner with docker. I need to output some GitLab CI variables (like CI_JOB_ID or CI_COMMIT_TAG) directly to node app. Using gitlab http api is not good for me. I need to store that information to any.json file right after build process. How to implement it?
Asked
Active
Viewed 1,546 times
1 Answers
1
Reading the environment variables in your nodejs application should do the trick as explained in this stack overflow post:
process.env.ENV_VARIABLE
All Gitlab CI injected variables should be accessible.

Community
- 1
- 1

Stefan van Gastel
- 4,330
- 23
- 25