-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix errors in repo structure cache script and improve pipeline (#7733)
* Update repo URLs and requirements file path for cache job * Fixing bug in script * Update yaml to match PPE and PROD database names and repo branches * Use git owner uppercase to match DB key in PPE and PROD * Update both PPE and PROD in different steps using the same pipeline
- Loading branch information
1 parent
1966675
commit 29b300b
Showing
2 changed files
with
18 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
parameters: | ||
- name: DB_NAME | ||
type: string | ||
default: "openapi-portal" | ||
|
||
- name: COLLECTION_NAME | ||
type: string | ||
default: "repoStructureCache" | ||
|
||
- name: REPOS_URL_LIST | ||
type: string | ||
default: "https://github.com/test-repo-billy/azure-rest-api-specs/tree/main,https://github.com/test-repo-billy/azure-rest-api-specs-pr/tree/RPSaaSDev,https://github.com/test-repo-billy/azure-rest-api-specs-pr/tree/main,https://github.com/test-repo-billy/azure-rest-api-specs/tree/RPSaaSDev" | ||
|
||
trigger: | ||
- main | ||
trigger: none | ||
pr: none | ||
|
||
pool: | ||
name: azsdk-pool-mms-ubuntu-2204-general | ||
vmImage: ubuntu-22.04 | ||
|
||
steps: | ||
|
||
- script: | | ||
pip install -r 'eng/scripts/OpenAPI Hub/requirements.txt' | ||
pip install -r 'eng/scripts/openapitools/python/cacherepostructure/requirements.txt' | ||
pip list | ||
python 'eng/scripts/openapitools/python/cacherepostructure/sync-repo-structure-cache.py' --db_name ${{ parameters.DB_NAME }} --collection_name ${{ parameters.COLLECTION_NAME }} --repos_url_list ${{ parameters.REPOS_URL_LIST }} --repo_clone_path $(System.DefaultWorkingDirectory) | ||
displayName: Run Script | ||
displayName: Install dependencies | ||
|
||
- script: | | ||
python 'eng/scripts/openapitools/python/cacherepostructure/sync-repo-structure-cache.py' --db_name "openapiPortal" --collection_name "repoStructureCache" --repos_url_list "https://github.com/Azure/azure-rest-api-specs/tree/main,https://github.com/Azure/azure-rest-api-specs-pr/tree/RPSaaSDev,https://github.com/Azure/azure-rest-api-specs-pr/tree/main,https://github.com/Azure/azure-rest-api-specs-pr/tree/RPSaaSMaster" --repo_clone_path $(System.DefaultWorkingDirectory) | ||
displayName: Update PROD cache | ||
env: | ||
MONGO_CONNECTION_STRING: $(Open-API-MongoDB-Connection-String) | ||
GITHUB_TOKEN: $(azuresdk-github-pat) | ||
|
||
- script: | | ||
python 'eng/scripts/openapitools/python/cacherepostructure/sync-repo-structure-cache.py' --db_name "openapiPortal" --collection_name "repoStructureCache" --repos_url_list "https://github.com/Azure/azure-rest-api-specs/tree/main,https://github.com/Azure/azure-rest-api-specs-pr/tree/RPSaaSDev,https://github.com/Azure/azure-rest-api-specs-pr/tree/main,https://github.com/Azure/azure-rest-api-specs-pr/tree/RPSaaSMaster" --repo_clone_path $(System.DefaultWorkingDirectory) | ||
displayName: Update PPE cache | ||
env: | ||
MONGO_CONNECTION_STRING: $(Open-API-MongoDB-Connection-String-PPE) | ||
GITHUB_TOKEN: $(azuresdk-github-pat) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters