Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab CI - include project ENV_VARIABLE support #33156

Open
rarkins opened this issue Dec 17, 2024 Discussed in #32509 · 0 comments
Open

GitLab CI - include project ENV_VARIABLE support #33156

rarkins opened this issue Dec 17, 2024 Discussed in #32509 · 0 comments
Labels
manager:gitlabci GitLab CI config files priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Dec 17, 2024

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 #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.yaml

Renovate 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)

Logs
2024-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"
@rarkins rarkins added type:feature Feature (new functionality) priority-4-low Low priority, unlikely to be done unless it becomes important to more people manager:gitlabci GitLab CI config files labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager:gitlabci GitLab CI config files priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

1 participant