New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ado-ext-telemetry): Embed upload artifact into task #1085
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1085 +/- ##
==========================================
+ Coverage 89.65% 89.89% +0.23%
==========================================
Files 54 54
Lines 1286 1316 +30
Branches 151 156 +5
==========================================
+ Hits 1153 1183 +30
Misses 133 133
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done!
packages/ado-extension/src/progress-reporter/console/ado-console-comment-creator.ts
Outdated
Show resolved
Hide resolved
packages/ado-extension/src/progress-reporter/console/ado-console-comment-creator.ts
Outdated
Show resolved
Hide resolved
Many changes made since initial review :)
packages/ado-extension/task.json
Outdated
"label": "Artifact Name", | ||
"required": false, | ||
"defaultValue": "accessibility-reports", | ||
"helpMarkDown": "Name of the report artifact to be uploaded to the build." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: It might be good to be explicit about how this interacts with uploadResultsAsArtifact
by adding a visibleRule
for pipeline UX users and a Ignored if uploadResultAsArtifact is false.
to the helpMarkdown
for yaml users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM modulo the minor suggestion for the artifactName
settings in task.json
143e204
to
ba4dd78
Compare
Details
This removes the need to have a separate publish task for the report artifacts in the azure-pipelines.yml. It is using the special logging commands to upload an artifact in ADO pipelines. It also updates the documentation accordingly.
I ran pipelines for Windows, Ubuntu, and Mac to ensure operability across operating systems. I also ran a test pipeline that still had the publish step defined in the yaml file. It fails with an error stating that the artifact already exists.
Motivation
Feature work, partially addressing #1063
Context
I initially attempted to use the
uploadArtifact
method defined in theazure-pipelines-task-lib/task
library only to find out that under the hood it uses the special logging command via aconsole.log
call. We are capturing and modifying thestdout
, and anything that uses a console.log receives a##debug
prefix. Once I realized that the underlying mechanism was to use the logging commands, I switched to using the logging command directly.Pull request checklist
yarn test
)<rootDir>/test-results/unit/coverage
yarn precheckin
)Accessibility Checks (pull_request)
check should fail. All other checks should pass.