diff --git a/conda_smithy/data/conda-forge.json b/conda_smithy/data/conda-forge.json index 35ff828d6..41e2c7828 100644 --- a/conda_smithy/data/conda-forge.json +++ b/conda_smithy/data/conda-forge.json @@ -83,6 +83,19 @@ "description": "The name of the Azure Pipelines project", "title": "Project Name" }, + "build_id": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The build ID for the specific feedstock used for rendering the badges in the\nREADME file generated. When the value is None, conda-smithy will compute the\nbuild ID by calling the Azure API which requires a token for private azure\nprojects.", + "title": "Build Id" + }, "upload_packages": { "anyOf": [ { @@ -133,7 +146,7 @@ } ], "default": null, - "description": "The name of the GitHub user or organization, if passed with the GithubConfig provider, must comply with the value of the user_or_org field", + "description": "The name of the Azure user or organization. Defaults to the value of github: user_or_org.", "title": "User Or Org" }, "store_build_artifacts": { @@ -707,7 +720,7 @@ } ], "default": "conda-forge", - "description": "The name of the GitHub user or organization, if passed with the AzureConfig provider, must comply with the value of the user_or_org field", + "description": "The name of the GitHub user or organization", "title": "User Or Org" }, "repo_name": { diff --git a/conda_smithy/data/conda-forge.yml b/conda_smithy/data/conda-forge.yml index 6dd82f56f..760ea722a 100644 --- a/conda_smithy/data/conda-forge.yml +++ b/conda_smithy/data/conda-forge.yml @@ -1,6 +1,7 @@ appveyor: image: Visual Studio 2017 azure: + build_id: null force: false free_disk_space: false max_parallel: 50 diff --git a/conda_smithy/schema.py b/conda_smithy/schema.py index bf124271f..e3da668c5 100644 --- a/conda_smithy/schema.py +++ b/conda_smithy/schema.py @@ -172,6 +172,18 @@ class AzureConfig(BaseModel): description="The name of the Azure Pipelines project", ) + build_id: Optional[int] = Field( + default=None, + description=cleandoc( + """ + The build ID for the specific feedstock used for rendering the badges in the + README file generated. When the value is None, conda-smithy will compute the + build ID by calling the Azure API which requires a token for private azure + projects. + """ + ), + ) + upload_packages: Optional[bool] = Field( default=True, description="Whether to upload the packages to Anaconda.org. Useful for testing.", @@ -205,8 +217,8 @@ class AzureConfig(BaseModel): user_or_org: Optional[Union[str, Nullable]] = Field( default=None, - description="The name of the GitHub user or organization, if passed with " - "the GithubConfig provider, must comply with the value of the user_or_org field", + description="The name of the Azure user or organization. Defaults to the " + "value of github: user_or_org.", exclude=True, # Will not be rendered in the model dump since we check if it was # set or not ) @@ -228,8 +240,7 @@ class GithubConfig(BaseModel): model_config: ConfigDict = ConfigDict(extra="forbid") user_or_org: Optional[str] = Field( - description="The name of the GitHub user or organization, \ - if passed with the AzureConfig provider, must comply with the value of the user_or_org field", + description="The name of the GitHub user or organization", default="conda-forge", ) repo_name: Optional[str] = Field( diff --git a/news/1871-build-id-azure.rst b/news/1871-build-id-azure.rst new file mode 100644 index 000000000..bad18e0fc --- /dev/null +++ b/news/1871-build-id-azure.rst @@ -0,0 +1,23 @@ +**Added:** + +* + +**Changed:** + +* + +**Deprecated:** + +* + +**Removed:** + +* + +**Fixed:** + +* Added missing ``azure: build_id`` into the json schema. (#1871) + +**Security:** + +*