-
Notifications
You must be signed in to change notification settings - Fork 271
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
[WIP] Refractor the check-for-build method and tests #1630
Conversation
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
Codecov Report
@@ Coverage Diff @@
## main #1630 +/- ##
=========================================
Coverage 94.67% 94.67%
Complexity 13 13
=========================================
Files 163 163
Lines 3437 3437
Branches 21 21
=========================================
Hits 3254 3254
Misses 180 180
Partials 3 3 Continue to review full report at Codecov.
|
Should this be closed in favor of #1628? |
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.
I think that miss on he previous PR could have been caught by unit tests. Before we do more work here can we add tests for this jenkinsfile that cover the success and failure build cases?
Note; we should revert the previous PR if this is impacting the builds negatively
Oh my bad, read too quickly. Sounds like the SHA should be uploaded inside the |
Yes, that's another way I was considering. |
Yes, adding a test for |
You can't use try/catch because it will swallow the error from uploading the SHA, and we'll never know. I would move it. |
That makes sense.. Working on it. |
Signed-off-by: Zelin Hao <zelinhao@amazon.com>
@@ -76,11 +76,6 @@ pipeline { | |||
string(name: 'INPUT_MANIFEST', value: "${INPUT_MANIFEST}"), | |||
string(name: 'TEST_MANIFEST', value: "${TEST_MANIFEST}") | |||
], wait: true, propagate: false | |||
echo "Build succeeded, uploading build SHA for that job" |
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.
We should still add tests to confirm the behavior is correct
Closing this for now since this is not being worked actively. |
Description
I found out a problem regarding of the PR just merged #1628. When we disable
propagate
when trigger the job, the followingwill be executed after triggered job failed which not what we expected. We shouldn't upload it if the distribution-build failed.
The use of try-catch block will avoid this situation, if the
distribution-build
failed, nothing below the job call in the try block will be executed.Issues Resolved
continue on #1627
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.