Last active
June 21, 2022 06:58
-
-
Save karl-johan-grahn/b424880523b8ee7527ef94d7765fe610 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| stages: | |
| - config_validation | |
| - check_dependencies | |
| validation: | |
| stage: config_validation | |
| variables: | |
| LOG_LEVEL: debug | |
| image: | |
| name: renovate/renovate:latest | |
| entrypoint: [''] | |
| script: | |
| - cd $CI_PROJECT_DIR | |
| - renovate-config-validator | |
| rules: | |
| - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' | |
| renovate: | |
| stage: check_dependencies | |
| variables: | |
| LOG_LEVEL: debug | |
| RENOVATE_TOKEN: $GITLAB_TOKEN | |
| # Optional GitHub token to fetch changelogs from dependency repositories, used to prevent rate-limiting when accessing the API | |
| GITHUB_COM_TOKEN: $GITHUB_TOKEN | |
| DOCKER_USERNAME: $CI_REGISTRY_USER # needed to allow Renovate to check against GitLab's own Docker container registry | |
| DOCKER_PASSWORD: $CI_REGISTRY_PASSWORD | |
| image: | |
| name: renovate/renovate:latest | |
| entrypoint: [''] | |
| script: | |
| # To avoid unauthorized dependency lookup for private GitLab projects, | |
| # use git's insteadOf to convert SSH/git protocol URLs into HTTPS URLs | |
| - git config --global credential.helper store | |
| - echo "https://gitlab-ci-token:${RENOVATE_TOKEN}@<gitlab_url>" > ~/.git-credentials | |
| - git config --global url."https://gitlab-ci-token@<gitlab_url>".insteadOf "ssh://git@<gitlab_url>" | |
| - cd $CI_PROJECT_DIR | |
| - renovate | |
| rules: | |
| - if: '$CI_PIPELINE_SOURCE == "schedule"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment