From 0f42d9685f42afd0d1b50416e97db52fb1f0411e Mon Sep 17 00:00:00 2001 From: Demo Date: Sun, 11 Oct 2026 22:38:30 +0200 Subject: [PATCH] Add manually triggered Azure DevOps pipeline for Renovate --- README.md | 12 +++++++++ renovate/azure-pipelines.yml | 51 ++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 renovate/azure-pipelines.yml diff --git a/README.md b/README.md index 89ba62a..45c2799 100644 --- a/README.md +++ b/README.md @@ -84,3 +84,15 @@ git merge forgejo/renovate/-npm ``` Optional: `$env:GITHUB_COM_TOKEN = ''` - Renovate then adds release notes from github.com to the PRs. + +## Azure DevOps pipeline + +`renovate/azure-pipelines.yml` runs Renovate for this repository on Azure DevOps (Server) and is triggered manually. +Create a pipeline from this file (existing YAML file, path `/renovate/azure-pipelines.yml`) and run it. + +- Uses the build service identity (`System.AccessToken`); it needs Contribute, Create branch and + Contribute to pull requests on this repository. +- Needs a self-hosted agent (pool `Default`) with Git and internet access to npmjs.org and nuget.org. +- Unlike `renovate-update.ps1` it uses the standard branch prefix `renovate/`, so existing PRs are updated + instead of new ones being created on every run. +- Report and debug log are published as the pipeline artifact `renovate-results`. diff --git a/renovate/azure-pipelines.yml b/renovate/azure-pipelines.yml new file mode 100644 index 0000000..ac1cad1 --- /dev/null +++ b/renovate/azure-pipelines.yml @@ -0,0 +1,51 @@ +# Manually triggered Renovate run for this repository on Azure DevOps (Server). +# The repository configuration is read from renovate.json in the repository. +# +# Requirements: +# - Self-hosted agent with Git and internet access to npmjs.org / nuget.org +# - The build service identity needs these permissions on this repository: +# Contribute, Create branch, Contribute to pull requests +trigger: none +pr: none + +pool: + name: Default # self-hosted agent pool + +variables: + renovateVersion: 44.149.3 + +steps: + # Renovate clones the repository itself + - checkout: none + + - task: UseNode@1 + displayName: Use Node.js 24 + inputs: + version: 24.x + + # .NET SDK for updating the NuGet lock files (packages.lock.json) + - task: UseDotNet@2 + displayName: Use .NET SDK 8 + inputs: + packageType: sdk + version: 8.x + + - script: >- + npx --yes renovate@$(renovateVersion) + --platform=azure + --endpoint=$(System.CollectionUri) + --report-type=file --report-path=renovate-results/renovate-report.json + "$(System.TeamProject)/$(Build.Repository.Name)" + displayName: Run Renovate + env: + RENOVATE_TOKEN: $(System.AccessToken) + RENOVATE_GIT_AUTHOR: Renovate Bot + # Relative path on purpose: Renovate lowercases LOG_FILE + LOG_FILE: renovate-results/renovate.log + LOG_FILE_LEVEL: debug + LOG_FILE_FORMAT: pretty + + - publish: renovate-results + artifact: renovate-results + displayName: Publish report and debug log + condition: always()