diff --git a/lib/data/monorepo.json b/lib/data/monorepo.json index c7ac3e7d5b1..f8da8914c8d 100644 --- a/lib/data/monorepo.json +++ b/lib/data/monorepo.json @@ -545,6 +545,7 @@ "slim-message-bus": "https://github.com/zarusz/SlimMessageBus", "spectre-console": "https://github.com/spectreconsole/spectre.console", "springfox": "https://github.com/springfox/springfox", + "stack-exchange-redis-extensions": "https://github.com/imperugo/StackExchange.Redis.Extensions", "steeltoe": "https://github.com/SteeltoeOSS/steeltoe", "storybook": "https://github.com/storybookjs/storybook", "storybook-react-native": "https://github.com/storybookjs/react-native", diff --git a/lib/modules/manager/pep621/extract.spec.ts b/lib/modules/manager/pep621/extract.spec.ts index 3d9fec910f1..e24e87885d5 100644 --- a/lib/modules/manager/pep621/extract.spec.ts +++ b/lib/modules/manager/pep621/extract.spec.ts @@ -236,6 +236,14 @@ describe('modules/manager/pep621/extract', () => { ); expect(result?.deps).toEqual([ + { + commitMessageTopic: 'Python', + currentValue: '>=3.7', + datasource: 'python-version', + depType: 'requires-python', + packageName: 'python', + versioning: 'pep440', + }, { packageName: 'blinker', depName: 'blinker', @@ -507,6 +515,14 @@ describe('modules/manager/pep621/extract', () => { expect(res).toMatchObject({ extractedConstraints: { python: '>=3.11' }, deps: [ + { + commitMessageTopic: 'Python', + currentValue: '>=3.11', + datasource: 'python-version', + depType: 'requires-python', + packageName: 'python', + versioning: 'pep440', + }, { packageName: 'jwcrypto', depName: 'jwcrypto', @@ -567,6 +583,14 @@ describe('modules/manager/pep621/extract', () => { expect(res).toMatchObject({ extractedConstraints: { python: '>=3.11' }, deps: [ + { + commitMessageTopic: 'Python', + currentValue: '>=3.11', + datasource: 'python-version', + depType: 'requires-python', + packageName: 'python', + versioning: 'pep440', + }, { packageName: 'attrs', depName: 'attrs', @@ -595,6 +619,12 @@ describe('modules/manager/pep621/extract', () => { expect(res).toMatchObject({ extractedConstraints: { python: '>=3.11' }, deps: [ + { + packageName: 'python', + depType: 'requires-python', + datasource: 'python-version', + versioning: 'pep440', + }, { packageName: 'attrs', depName: 'attrs', @@ -623,7 +653,7 @@ describe('modules/manager/pep621/extract', () => { readme = "README.md" `; const res = await extractPackageFile(content, 'pyproject.toml'); - expect(res?.deps).toHaveLength(2); + expect(res?.deps).toHaveLength(3); }); }); }); diff --git a/lib/modules/manager/pep621/extract.ts b/lib/modules/manager/pep621/extract.ts index e63b229701e..cde3fd55129 100644 --- a/lib/modules/manager/pep621/extract.ts +++ b/lib/modules/manager/pep621/extract.ts @@ -1,5 +1,7 @@ import is from '@sindresorhus/is'; import { logger } from '../../../logger'; +import { PythonVersionDatasource } from '../../datasource/python-version'; +import * as pep440 from '../../versioning/pep440'; import type { ExtractConfig, PackageDependency, @@ -29,9 +31,22 @@ export async function extractPackageFile( const packageFileVersion = def.project?.version; const pythonConstraint = def.project?.['requires-python']; - const extractedConstraints = is.nonEmptyString(pythonConstraint) - ? { extractedConstraints: { python: pythonConstraint } } - : {}; + let extractedConstraints; + if (is.nonEmptyString(pythonConstraint)) { + extractedConstraints = { + extractedConstraints: { python: pythonConstraint }, + }; + deps.push({ + packageName: 'python', + depType: 'requires-python', + currentValue: pythonConstraint, + commitMessageTopic: 'Python', + datasource: PythonVersionDatasource.id, + versioning: pep440.id, + }); + } else { + extractedConstraints = {}; + } // pyProject standard definitions deps.push( diff --git a/lib/modules/manager/pep621/processors/pdm.ts b/lib/modules/manager/pep621/processors/pdm.ts index 9aedd97b908..32491532c9a 100644 --- a/lib/modules/manager/pep621/processors/pdm.ts +++ b/lib/modules/manager/pep621/processors/pdm.ts @@ -53,7 +53,9 @@ export class PdmProcessor implements PyProjectProcessor { registryUrls.push(source.url); } for (const dep of deps) { - dep.registryUrls = [...registryUrls]; + if (dep.datasource === PypiDatasource.id) { + dep.registryUrls = [...registryUrls]; + } } return deps; diff --git a/lib/modules/platform/azure/readme.md b/lib/modules/platform/azure/readme.md index e4042ccd578..2c8cb9d8fbb 100644 --- a/lib/modules/platform/azure/readme.md +++ b/lib/modules/platform/azure/readme.md @@ -50,6 +50,11 @@ steps: inputs: workingFile: .npmrc + - bash: | + add-apt-repository ppa:git-core/ppa + apt update && apt install git -y + displayName: 'Install latest version of Git' + - bash: | git config --global user.email 'bot@renovateapp.com' git config --global user.name 'Renovate Bot' @@ -57,7 +62,9 @@ steps: env: RENOVATE_PLATFORM: azure RENOVATE_ENDPOINT: $(System.CollectionUri) + RENOVATE_CONFIG_FILE: $(Build.SourcesDirectory)/renovate_bot_config.json RENOVATE_TOKEN: $(System.AccessToken) + LOG_LEVEL: debug ``` ### Create a .npmrc file @@ -91,6 +98,42 @@ module.exports = { For the `repositories` key, replace `YOUR-PROJECT/YOUR-REPO` with your Azure DevOps project and repository. +### Using Azure DevOps internal API for pipeline tasks versions + + +!!! info + 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. + +To let Renovate use the Azure DevOps internal API, you must set these variables in your config: + +- `platform` = `azure` +- `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) +- `hostRules.hostType` = `azure-pipelines-tasks` + +```json title="Example config file in JSON format" + "platform": "azure", + "endpoint": "https://dev.azure.com/ORG_NAME", + "azure-pipelines": { + "enabled": true + }, + "repositories": ["PROJECT_NAME/REPO_NAME"], + "prHourlyLimit": 0, + "baseBranches": ["main"], + "hostRules": [ + { + "matchHost": "https://dev.azure.com/", + "hostType": "azure-pipelines-tasks" + } + ], + "packageRules": [ + { + "matchDatasources": ["azure-pipelines-tasks"], + "extractVersion": "^(?\\d+)" + } + ] +} +``` + ### Yarn users To do a successful `yarn install` you need to match the URL of the registry fully.