diff --git a/docs/usage/setup-azure-devops.md b/docs/usage/setup-azure-devops.md index 3f61a40a263b75618c674f1a1727e6126b4874f3..c68074db36d7930116079614937cbecd483aba4f 100644 --- a/docs/usage/setup-azure-devops.md +++ b/docs/usage/setup-azure-devops.md @@ -1,81 +1,76 @@ --- -title: Azure DevOps Setup +title: Azure DevOps setup description: How to setup Renovate for Azure DevOps --- -# Azure DevOps Setup (for NPM/YARN) +# Azure DevOps setup (for npm/Yarn) 1. Create a brand new pipeline within Azure DevOps, and select your source - - - +  1. Select your repository +1. Within _Configure your pipeline_ select: **Starter pipeline file** +  +1. Replace all contents with next npm/Yarn template (change all _PLACEHOLDER_ strings with your values): -1. Within <i>Configure your pipeline</i> select: <b>Starter pipeline file</b> - - - -1. Replace all contents with next NPM/YARN template (change all <i>PLACEHOLDER</i> strings with your values): - -``` -schedules: - - cron: '0 3 * * *' - displayName: 'Every day at 3am' - branches: - include: - - master - always: true + ``` + schedules: + - cron: '0 3 * * *' + displayName: 'Every day at 3am' + branches: + include: + - master + always: true -trigger: none + trigger: none -jobs: - - job: - pool: - vmImage: 'ubuntu-latest' - steps: - - checkout: none + jobs: + - job: + pool: + vmImage: 'ubuntu-latest' + steps: + - checkout: none - - task: Bash@3 - displayName: Create .npmrc file - inputs: - targetType: inline - script: | - cat > .npmrc << EOF - PLACEHOLDER(.NPMRC CONTENTS) - EOF + - task: Bash@3 + displayName: Create .npmrc file + inputs: + targetType: inline + script: | + cat > .npmrc << EOF + PLACEHOLDER(.NPMRC CONTENTS) + EOF - - task: npmAuthenticate@0 - displayName: npm Authenticate - inputs: - workingFile: .npmrc + - task: npmAuthenticate@0 + displayName: npm Authenticate + inputs: + workingFile: .npmrc - - task: Bash@3 - displayName: Create renovate config - inputs: - targetType: inline - script: | - cat > config.js << EOF - module.exports = { - platform: 'azure', - endpoint: 'https://dev.azure.com/PLACEHOLDER(ORGANIZATION)/', - token: '$(System.AccessToken)', - npmrc: - '$(sed ':a;N;$!ba;s/\n/\\n/g' .npmrc)', - ignoreNpmrcFile: true, - repositories: ['PLACEHOLDER(PROJECT)/PLACEHOLDER(REPO NAME)'] - }; - EOF + - task: Bash@3 + displayName: Create renovate config + inputs: + targetType: inline + script: | + cat > config.js << EOF + module.exports = { + platform: 'azure', + endpoint: 'https://dev.azure.com/PLACEHOLDER(ORGANIZATION)/', + token: '$(System.AccessToken)', + npmrc: + '$(sed ':a;N;$!ba;s/\n/\\n/g' .npmrc)', + ignoreNpmrcFile: true, + repositories: ['PLACEHOLDER(PROJECT)/PLACEHOLDER(REPO NAME)'] + }; + EOF - - task: Bash@3 - displayName: Run renovate - inputs: - targetType: inline - script: | - # Git credentials - git config --global user.email 'bot@renovateapp.com' - git config --global user.name 'Renovate Bot' - # Run renovate - npx --userconfig .npmrc renovate -``` + - task: Bash@3 + displayName: Run renovate + inputs: + targetType: inline + script: | + # Git credentials + git config --global user.email 'bot@renovateapp.com' + git config --global user.name 'Renovate Bot' + # Run renovate + npx --userconfig .npmrc renovate + ``` -1. Additionally, you can add `renovate.json` with renovate configurations in the root of the repo. [Read more about configurations options](https://docs.renovatebot.com/configuration-options/) +1. Additionally, you can add `renovate.json` with Renovate configurations in the root of the repo. [Read more about configurations options](https://docs.renovatebot.com/configuration-options/)