diff --git a/docs/usage/assets/images/azure-devops-setup-1.png b/docs/usage/assets/images/azure-devops-setup-1.png new file mode 100644 index 0000000000000000000000000000000000000000..4d2b213dbff54884275d016147a8a15dabd8e7a2 Binary files /dev/null and b/docs/usage/assets/images/azure-devops-setup-1.png differ diff --git a/docs/usage/assets/images/azure-devops-setup-2.png b/docs/usage/assets/images/azure-devops-setup-2.png new file mode 100644 index 0000000000000000000000000000000000000000..17fbc1fbf4cf21cdd19b8a9a2f2afdcbae246688 Binary files /dev/null and b/docs/usage/assets/images/azure-devops-setup-2.png differ diff --git a/docs/usage/setup-azure-devops.md b/docs/usage/setup-azure-devops.md new file mode 100644 index 0000000000000000000000000000000000000000..b5afe81263d3c11909ec13ee473cd5a2456a1b7f --- /dev/null +++ b/docs/usage/setup-azure-devops.md @@ -0,0 +1,81 @@ +--- +title: Azure DevOps Setup +description: How to setup Renovate for Azure DevOps +--- + +# 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 <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 + +trigger: 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: 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: 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/). diff --git a/readme.md b/readme.md index 36523f6afff37b18b147605afec8641b384d7ab6..8fafc840e7d79d964f5c05dd7687fe35e2d1b529 100644 --- a/readme.md +++ b/readme.md @@ -43,7 +43,7 @@ it now. A GitHub Marketplace plan is required only for private repositories. [Mo For GitLab, log into [app.renovatebot.com/dashboard](https://app.renovatebot.com/dashboard) for a convenient way to add Renovate Bot to your project. Currently the GitLab app is free for both public and private repositories. [More details on the GitLab App installation](https://docs.renovatebot.com/install-gitlab-app/). -For Azure DevOps, visit the Visual Studio Marketplace and install the [Renovate Me](https://marketplace.visualstudio.com/items?itemName=jyc.vsts-extensions-renovate-me) extension in your organisation. From there you can create a pipeline with the `RenovateMe` task. [More details on how to configure the pipeline](https://marketplace.visualstudio.com/items?itemName=jyc.vsts-extensions-renovate-me). Note: This extension is created and maintained personally by a Renovate developer/user so support requests relating to the extension itself cannot be answered directly in the main Renovate repository. +For Azure DevOps, visit the Visual Studio Marketplace and install the [Renovate Me](https://marketplace.visualstudio.com/items?itemName=jyc.vsts-extensions-renovate-me) extension in your organisation. From there you can create a pipeline with the `RenovateMe` task. [More details on how to configure the pipeline](https://marketplace.visualstudio.com/items?itemName=jyc.vsts-extensions-renovate-me). Note: This extension is created and maintained personally by a Renovate developer/user so support requests relating to the extension itself cannot be answered directly in the main Renovate repository. Alternatively, you can create custom pipeline with with a `yml` definition that will trigger `npx renovate`. [More details on how to configure the pipeline](https://docs.renovatebot.com/setup-azure-devops/). ## Configuration