GitLab CI - include project ENV_VARIABLE support
Author: rarkinsCreated Dec 17, 2024Updated Sep 28, 2026
Labelspriority-4-lowmanager:gitlabci
For gitlabci/gitlabci-include managers, if depName/packageName match an env pattern (e.g. $SOME_VAR) then we should look for the presence of that variable in env and replace it if so.
Discussed in https://github.com/renovatebot/renovate/discussions/32509
Originally posted by Mazorius November 13, 2024
How are you running Renovate?
Self-hosted Renovate
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
GitLab
Please tell us more about your question or problem
Hi,
we create in our self-hosted GitLab instance a CI/CD job library which can be imported like this:
include:
- project: $INSTANCE_VARIABLE
ref: '0.1.0'
file: path/to/job-template.yamlRenovate cannot resolve the $INSTANCE_VARIABLE and find therefore new tags in a GitLab project.
I added it as customEnvVariables but that does not help.
Any idea how I can got this fixed?
Logs (if relevant)
Logs2024-11-29T07:03:41.865490Z 01O "config": {
2024-11-29T07:03:41.865497Z 01O "gitlabci-include": [
2024-11-29T07:03:41.865506Z 01O {
2024-11-29T07:03:41.865519Z 01O "deps": [
2024-11-29T07:03:41.865525Z 01O {
2024-11-29T07:03:41.865534Z 01O "datasource": "gitlab-tags",
2024-11-29T07:03:41.865548Z 01O "depName": "$INSTANCE_VARIABLE",
2024-11-29T07:03:41.865555Z 01O "depType": "repository",
2024-11-29T07:03:41.865565Z 01O "currentValue": "main",
2024-11-29T07:03:41.865579Z 01O "registryUrls": ["https://gitlab.example.com"],
2024-11-29T07:03:41.865586Z 01O "updates": [],
2024-11-29T07:03:41.865596Z 01O "packageName": "$INSTANCE_VARIABLE",
2024-11-29T07:03:41.865611Z 01O "versioning": "semver-coerced",
2024-11-29T07:03:41.865618Z 01O "warnings": [],
2024-11-29T07:03:41.865627Z 01O "skipReason": "invalid-value"
2024-11-29T07:03:41.865640Z 01O }
2024-11-29T07:03:41.865646Z 01O ],
2024-11-29T07:03:41.865656Z 01O "packageFile": ".gitlab-ci.yml"
2024-11-29T07:03:41.865669Z 01O }
2024-11-29T07:03:41.865675Z 01O ],
WARN: Package lookup failures (repository=repo/path/project)
"warnings": ["Failed to look up gitlab-tags package $INSTANCE_VARIABLE"],
"files": [
"src/pipeline/.gitlab-ci.yml"Source: renovatebot/renovate