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
Support GitLab CI/CD components #23431
Comments
this should be added to the gitlabci manager, as the gitlab-include manager will be merged to it |
I started having a look at this. I think with the current syntax it might be challenging to implement: https://gitlab.com/groups/gitlab-org/-/epics/9897#note_1494759770. |
Does the directory structure update in 16.3 make the project/component distinction firm enough to move forward? Reference Merge Request. |
Does someone maybe already have a working (read: tested) custom manager for this which could be used in the meantime? |
I'm researching about GitLab CI/CD components. I'm curious about why the include syntax is challenging. My understanding about: include:
- component: $CI_SERVER_HOST/$CI_PROJECT_PATH/$EXAMPLE@$REF where:
Within the component definitions themselves, the YAML syntax is the usual Gitlab CI syntax, preceded with more YAML front-matter. any other ---
spec:
inputs:
job-stage:
default: test
search-path:
default: .
search-name:
default: Dockerfile
---
lint-dockerfiles:
image: hadolint/hadolint:v2.12.0-alpine
stage: $[[ inputs.job-stage ]]
script:
- hadolint --version
- find $[[ inputs.search-path ]] -type f -name $[[ inputs.search-name ]]
-exec hadolint
'{}'
\+ The key part seems matching for the |
I'm experimenting with the example at https://docs.renovatebot.com/modules/manager/regex/#using-custommanager-to-update-the-dependency-name-in-addition-to-version, it may fit. |
@lorenzogrv In previous iterations this syntax supported components in a any subdirectory, making it impossible to extract the project path from the reference. Your understanding is correct and it should be doable now. |
@lorenzogrv @mbrodala Here is my custom manager for cicd components: {
"customType": "regex",
"fileMatch": [
"\\.gitlab-ci\\.ya?ml$",
"templates/.+\\.ya?ml$"
],
"versioningTemplate": "semver",
"datasourceTemplate": "gitlab-releases",
"registryUrlTemplate": "https://{{{registryUrl}}}",
"depTypeTemplate": "repository",
"matchStrings": [
"component: (?<registryUrl>[^\\s\\/]+)\\/(?<depName>\\S+)\\/[^\\s\\/]+@(?<currentValue>\\S+)"
]
} |
@benedikt-bartscher Thanks, seems to work just fine! 👍 I only noticed that |
@mbrodala you are welcome. That's interesting, i will investigate why |
Yes, this works just fine. Renovate retrieves release notes separately from the specific data source AFAIK. |
@benedikt-bartscher Works like a charm, thanks for sharing. I used |
Finally, thanks @fgreinacher ! |
Discussed in #23424
Originally posted by fgreinacher July 18, 2023
Tell us more.
CI/CD components are a new way to reuse CI logic within GitLab, see upstream documentation.
They look very similar to other
include
s and can probably be implemented in the existinggitlabci-include
datasource.The text was updated successfully, but these errors were encountered: