From 6e0ef61d988d5b169dbf4e255148f336abb9f589 Mon Sep 17 00:00:00 2001 From: Philip <42116482+PhilipAbed@users.noreply.github.com> Date: Wed, 8 Mar 2023 09:08:58 +0200 Subject: [PATCH] docs(platform/codecommit): add aws codebuild examples (#19374) Co-authored-by: Rhys Arkins Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com> --- lib/modules/platform/codecommit/index.md | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/lib/modules/platform/codecommit/index.md b/lib/modules/platform/codecommit/index.md index de47f7b3aa5ab0..3ce6026ab4b6d7 100644 --- a/lib/modules/platform/codecommit/index.md +++ b/lib/modules/platform/codecommit/index.md @@ -142,3 +142,59 @@ module.exports = { ], }; ``` + +## CodeBuild examples + +Create a repository with `buildspec.yml`. +This repository will be your BuildProject job repository to run Renovate on your repositories. + +### Renovate Docker `buildspec.yml` + +```yml +version: 0.2 +env: + shell: bash + git-credential-helper: yes + variables: + RENOVATE_PLATFORM: 'codecommit' + RENOVATE_REPOSITORIES: '["repoName1", "repoName2"]' + RENOVATE_CONFIG: '{"extends":["config:base"]}' + LOG_LEVEL: 'debug' + AWS_REGION: 'us-east-1' +phases: + build: + on-failure: CONTINUE + commands: + - docker run --rm -e AWS_REGION -e RENOVATE_CONFIG -e RENOVATE_PLATFORM -e RENOVATE_REPOSITORIES -e LOG_LEVEL renovate/renovate +``` + +### Renovate CLI `buildspec.yml` + +```yml +version: 0.2 +env: + shell: bash + git-credential-helper: yes + variables: + RENOVATE_PLATFORM: 'codecommit' + RENOVATE_REPOSITORIES: '["repoName1", "repoName2"]' + RENOVATE_CONFIG: '{"extends":["config:base"]}' + LOG_LEVEL: 'debug' + AWS_REGION: 'us-east-1' +phases: + build: + on-failure: CONTINUE + commands: + - npm install -g renovate + - renovate +``` + +### Notes + +In order to reduce Renovate BuildProject time and avoid `npm install`. + +We recommend you install Renovate on the BuildProject Renovate job repository. + +You can add `config.js` global config to the repository. + +You can add the BuildProject repository to the `RENOVATE_REPOSITORIES` variable and get updates on new Renovate versions.