I'm trying to create a pipeline for dependency management tool Renovate:
# Runs the renovate bot on a schedule.
# Adapted from: https://blog.objektkultur.de/how-to-setup-renovate-in-azure-devops/
schedules:
- cron: "0 5 * * *"
displayName: "Every day at 7am"
branches:
include:
- main
- master
always: true
trigger: none
pool:
vmImage: ubuntu-latest
variables:
- group: "renovatebot"
steps:
- checkout: self
persistCredentials: true
fetchDepth: 1
- bash: |
git config --global user.email 'bot@renovateapp.com'
git config --global user.name 'Renovate Bot'
echo "TOKEN = $TOKEN"
echo "GITHUB_COM_TOKEN = $GITHUB_COM_TOKEN"
npx renovate
env:
TOKEN: $(System.AccessToken)
GITHUB_COM_TOKEN: $(githubtoken) # get a token from https://github.com/settings/tokens and save it in the 'renovatebot' variables group
#RENOVATE_CONFIG_FILE: "./pipelines/renovate/config.js" # use this environment variable if you prefer to have the renovate pipeline definition and the config file in it's own dictionary instead of the repository root.
It uses the System.AccessToken to run GIT commands.
This works for a single repo, but i'm trying to incorporate another repository into the same pipeline - i'm getting the following error however:
ERROR: Repository is not found (repository=[REDACTED]/[REDACTED])
This leads me to believe there is some auth issues accessing the second repository.
Reading through https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#protect-access-to-repositories-in-yaml-pipelines Then leads me to the 'uses' statement:
steps:
- checkout: git://FabrikamFiber/FabrikamTools # Azure Repos Git repository in the same organization
- script: # Do something with that repo
# Or you can reference it with a uses statement in the job
uses:
repositories: # List of referenced repositories
- FabrikamTools # Repository reference to FabrikamTools
steps:
- script: # Do something with that repo like clone it
However, if i try that in azure, i'm getting an error:
What am i missing? what is the correct usage of the 'uses' statement?
