Skip to content

Commit

Permalink
feat(private npm registry): Updated ADO task validation pipeline for …
Browse files Browse the repository at this point in the history
…private registry parameter (#2166)

#### Details

<!-- Usually a sentence or two describing what the PR changes -->
Added the new task in validation pipeline to validate the new parameter
"npmRegistryUrl" functionality in pipeline

##### Motivation

<!-- This can be as simple as "addresses issue #123" -->
[Feature
2207295](https://dev.azure.com/mseng/1ES/_workitems/edit/2207295):
Enable option to use private npm registry Url in a11y ado extension

##### Context

<!-- Are there any parts that you've intentionally left out-of-scope for
a later PR to handle? -->

<!-- Were there any alternative approaches you considered? What
tradeoffs did you consider? -->

#### Pull request checklist
<!-- If a checklist item is not applicable to this change, write "n/a"
in the checkbox -->
- [na] Addresses an existing issue: Fixes #0000
- [na] Added relevant unit test for your changes. (`yarn test`)
- [na] Verified code coverage for the changes made. Check coverage
report at: `<rootDir>/test-results/unit/coverage`
- [x] Ran precheckin (`yarn precheckin`)
  • Loading branch information
v-sharmachir authored Sep 6, 2024
1 parent a2a794c commit 9e11018
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion pipelines/ado-extension-validation-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@ parameters:
type: string

jobs:
- job: run_registry_url_tests
displayName: 'Run registry URL tests'
steps:
- task: ${{ parameters.taskUnderTest }}
displayName: '[should fail] case fail: use different org artifact feed registry URL without credentials'
inputs:
url: 'https://accessibilityinsights.io/'
maxUrls: 1
npmRegistryUrl: $(outsideOrgArtifactURL)
outputArtifactName: 'no-artifact-will-be-created-here'
condition: succeededOrFailed()
continueOnError: true

- task: ${{ parameters.taskUnderTest }}
displayName: '[should succeed] case succeed: use same org artifact feed registry URL'
inputs:
url: 'https://accessibilityinsights.io/'
maxUrls: 1
npmRegistryUrl: $(sameOrgArtifactURL)
outputArtifactName: 'accessibility-reports-case-same-org-registry-url'

- job: run_tests
displayName: 'Run tests'
templateContext:
Expand Down Expand Up @@ -148,6 +169,7 @@ jobs:
maxUrls: 10
keepUrlFragment: 'true'
outputArtifactName: 'accessibility-reports-case-keepUrlFragment-1'
scanTimeout: 180000
condition: succeededOrFailed()
continueOnError: true

Expand All @@ -165,7 +187,9 @@ jobs:
continueOnError: true

- job: validate_artifacts
dependsOn: run_tests
dependsOn:
- run_tests
- run_registry_url_tests
displayName: 'Validate artifacts'
#pool:
# name: a11y-ado-auth
Expand All @@ -190,6 +214,7 @@ jobs:
echo artifacts/accessibility-reports-case-fail-7/index.html >> expected-index-html-files.txt
echo artifacts/accessibility-reports-case-keepUrlFragment-1/index.html >> expected-index-html-files.txt
echo artifacts/accessibility-reports-case-keepUrlFragment-2/index.html >> expected-index-html-files.txt
echo artifacts/accessibility-reports-case-same-org-registry-url/index.html >> expected-index-html-files.txt
echo artifacts/accessibility-reports-case-succeed-1/index.html >> expected-index-html-files.txt
echo artifacts/accessibility-reports-case-succeed-2/index.html >> expected-index-html-files.txt
echo artifacts/accessibility-reports/index.html >> expected-index-html-files.txt
Expand Down

0 comments on commit 9e11018

Please sign in to comment.