Skip to content

Commit

Permalink
Merge pull request #1871 from isuruf/schema_build_id
Browse files Browse the repository at this point in the history
Add azure: build_id to schema
  • Loading branch information
isuruf authored Mar 20, 2024
2 parents 44acb93 + 84ab741 commit 0f54614
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 6 deletions.
17 changes: 15 additions & 2 deletions conda_smithy/data/conda-forge.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
1 change: 1 addition & 0 deletions conda_smithy/data/conda-forge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
appveyor:
image: Visual Studio 2017
azure:
build_id: null
force: false
free_disk_space: false
max_parallel: 50
Expand Down
19 changes: 15 additions & 4 deletions conda_smithy/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down Expand Up @@ -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
)
Expand All @@ -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(
Expand Down
23 changes: 23 additions & 0 deletions news/1871-build-id-azure.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Added missing ``azure: build_id`` into the json schema. (#1871)

**Security:**

* <news item>

0 comments on commit 0f54614

Please sign in to comment.