-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(azure): update azuredevops docs to match new changes #33788
base: main
Are you sure you want to change the base?
docs(azure): update azuredevops docs to match new changes #33788
Conversation
lib/modules/platform/azure/readme.md
Outdated
{ | ||
"platform": "azure", | ||
"endpoint": "https://dev.azure.com/ORG_NAME", | ||
"token": "process.env.RENOVATE_TOKEN", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON files cannot read from process.env
. This example would put the literal string value "process.env.RENOVATE_TOKEN"
into the file, and not the value from env. Same as for the hostRules below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rarkins , it works on our on-prem azuredevops server.
Would it then works just because I'm calling npx renovate
with these env vars ?
RENOVATE_PLATFORM: azure
RENOVATE_ENDPOINT: $(System.CollectionUri)
RENOVATE_CONFIG_FILE: $(Build.SourcesDirectory)/renovate_bot_config.json
RENOVATE_TOKEN: $(System.AccessToken)
LOG_LEVEL: debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably. If you define things like token
in both file and env, env wins. So the "wrong" value for token
above would be overridden by the RENOVATE_TOKEN env
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it.
As seen in PR renovatebot#33788 discussion
- bash: | | ||
add-apt-repository ppa:git-core/ppa | ||
apt update && apt install git -y | ||
displayName: 'Install latest git version' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
displayName: 'Install latest git version' | |
displayName: 'Install latest version of Git' |
Are you allowed to use capitalization in the displayName
field/variable?
|
||
<!-- prettier-ignore --> | ||
!!! info | ||
Renovate bot is now using the set of APIs that azure provides to query the azure-pipelines tasks versions directly from the instance. ([PR #32966](https://github.com/renovatebot/renovate/pull/32966) and [Discussion #24820](https://github.com/renovatebot/renovate/discussions/24820)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renovate bot is now using the set of APIs that azure provides to query the azure-pipelines tasks versions directly from the instance. ([PR #32966](https://github.com/renovatebot/renovate/pull/32966) and [Discussion #24820](https://github.com/renovatebot/renovate/discussions/24820)) | |
Renovate now uses the set of APIs that Azure provides to query the azure-pipelines tasks versions directly from the instance. Read [pull request #32966](https://github.com/renovatebot/renovate/pull/32966) and [discussion #24820](https://github.com/renovatebot/renovate/discussions/24820) for more background information on this change. |
!!! info | ||
Renovate bot is now using the set of APIs that azure provides to query the azure-pipelines tasks versions directly from the instance. ([PR #32966](https://github.com/renovatebot/renovate/pull/32966) and [Discussion #24820](https://github.com/renovatebot/renovate/discussions/24820)) | ||
|
||
To use it, you need to have in your config : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use it, you need to have in your config : | |
To let Renovate use the Azure DevOps internal API, you must set these variables in your config: |
To use it, you need to have in your config : | ||
|
||
- `platform` = `azure` | ||
- `endpoint` = `$(System.CollectionUri)` (an [azure predefined variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `endpoint` = `$(System.CollectionUri)` (an [azure predefined variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml)) | |
- `endpoint` = `$(System.CollectionUri)`, this is an [Azure predefined variable](https://learn.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml) |
An example configuration file, in `.json` format this time, would be : | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An example configuration file, in `.json` format this time, would be : |
Let's use a codeblock title instead of this line. 😉
|
||
An example configuration file, in `.json` format this time, would be : | ||
|
||
```json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```json | |
```json title="Example config file in JSON format" |
"packageRules": [ | ||
{ | ||
"matchDatasources": ["azure-pipelines-tasks"], | ||
"extractVersion": "^(?<version>\\d+)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this? Are there some characters after which need ignoring?
Changes
I wanted to add examples so that new users will benefit from the recent changes related to how renovate picks up tasks version using internal APIs when
azure-pipelines
is enabled in renovate configuration.Context
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
pnpm docs:build
andpnpm mkdocs serve
to preview the documentation changes.Why another PR ?
I made a mistake with my previous PR by committing with the wrong mail, hence the CLA validation did not seem to work fine.
Sorry for the inconvenience.