diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a2b8712..ecfb7b08 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ stages: - ".pre" - "scan" - "automr" + - "renovate" - "lint" - "env-cleanup" - "env" @@ -131,6 +132,12 @@ variables: options: - "yes" - "no" + RUN_RENOVATE: + description: "Triggers the Renovate based check for dependency updates." + value: "no" + options: + - "yes" + - "no" RUN_TESTS: description: "Triggers execution of E2E-tests." value: "yes" @@ -536,6 +543,19 @@ reuse-linter: when: "never" - when: "always" +renovate: + rules: + - if: $RUN_RENOVATE == "yes" + when: "on_success" + image: "ghcr.io/renovatebot/renovate:37.59.7@sha256:a0dd48947ca03d9088ff7bfdcf689a5cc3c1eb9522d5ff87d14636b5ad60a3dc" + variables: + RENOVATE_CONFIG_FILE: "${CI_PROJECT_DIR}/.renovate/config.yaml" + RENOVATE_ENDPOINT: "${CI_API_V4_URL}" + RENOVATE_LOG_FILE_LEVEL: "debug" + script: + - "renovate ${RENOVATE_EXTRA_FLAGS}" + stage: "renovate" + generate-release-version: rules: - if: > diff --git a/.renovate/config.yaml b/.renovate/config.yaml index 0ad0abf8..262d0bcc 100644 --- a/.renovate/config.yaml +++ b/.renovate/config.yaml @@ -28,24 +28,23 @@ repositories: # Include package files only within these defined paths includePaths: - "helmfile/environments/default/images.yaml" - - "helmfile/apps/**" + - "helmfile/environments/default/charts.yaml" customManagers: - customType: "regex" fileMatch: - "helmfile/environments/default/images.yaml" datasourceTemplate: "docker" matchStrings: - # yamllint disable rule:quoted-strings - - '#\srenovate:\s[\s\S]*?registryUrl\=(?.*?)\s[\s\S]*?dependencyType\=(?.*?)\s[\s\S]*?repository:\s\"(?.*?)\"\s[\s\S]*?tag:\s\"(?.*?)(?:(?:@|\\\s*@)(?sha256:[a-f0-9]+)|\")' - # yamllint enable rule:quoted-strings + - > + # yamllint disable rule:line-length + providerCategory: ["|']?(?.+?)["|']?\n(?:.|\n|\r)+ registry: ["|']?(?.+?)["|']?\n(?:.|\n|\r)+ repository: ["|']?(?.+?)["|']?\n(?:.|\n|\r)+ tag: ["|']?(?[^@]+)@(?sha256:[a-f0-9]+)["|'] - customType: "regex" fileMatch: - - "^helmfile\/apps" - "helmfile/environments/default/charts.yaml" matchStrings: - # yamllint disable rule:quoted-strings - - '\#\srenovate:\s[\s\S]*?registryUrl\=(?.*?)\s[\s\S]*?packageName\=(?.*?)\s[\s\S]*?dataSource\=(?.*?)\s[\s\S]*?dependencyType\=(?.*?)\s[\s\S]*?name:\s\"(?.*?)\"\s[\s\S]*?version\:\s\"(?.*?)\"' - # yamllint enable rule:quoted-strings + - > + # yamllint disable rule:quoted-strings + providerCategory: ["|']?(?.+?)["|']?\n(?:.|\n|\r)+ registry: ["|']?(?.+?)["|']?\n(?:.|\n|\r)+ repository: ["|']?(?.+?)["|']?\n(?:.|\n|\r)+ name: ["|']?(?.+?)["|']?\n(?:.|\n|\r)+ version: ["|']?(?.+?)["|']? # Rules for matching packages packageRules: - matchDatasources: "docker"