-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Set up automation to comment on PRs w/ links to downstream jobs #21795
Comments
Initial prototype: jenkinsfile to check out a project from a branch, switch to a tag if applicable, and then using that SHA, comment on any applicable pull request. https://gist.github.com/nickboldt/efb8d1b3a60c079e46b5b7aab4412e22 Tested with: SHA = 58d8b4407ab5d2b9a696236202308d92d3e25340 TODO:
Phase 2:
|
Change-Id: Iad6e4c9def1d1340e97c1059c5d02e40ad40eaa2 Signed-off-by: Nick Boldt <[email protected]>
Change-Id: Iad6e4c9def1d1340e97c1059c5d02e40ad40eaa2 Signed-off-by: Nick Boldt <[email protected]>
new methods are added to util2.groovy via this PR: https://github.com/redhat-developer/devspaces/pull/850/files
Plus utilities:
DONE:
TODO:
Phase 2:
|
Change-Id: Iad6e4c9def1d1340e97c1059c5d02e40ad40eaa2 Signed-off-by: Nick Boldt <[email protected]>
…850) Change-Id: Iad6e4c9def1d1340e97c1059c5d02e40ad40eaa2 Signed-off-by: Nick Boldt <[email protected]> Signed-off-by: Nick Boldt <[email protected]>
Enabling PR comments for template, sync-to-downstream, get-sources-rhpkg, and push-latest jobs for 3.x: https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/merge_requests/1409 Affected (13):
TODO:
Other jobs to consider enabling:
|
…rigger so we can see what happens in eclipse-che/che#21795 Change-Id: I803297818611a30938f0f7ad15e33a39d73a817b Signed-off-by: Nick Boldt <[email protected]>
…eclipse-che/che#21795 Change-Id: I405ed5bba2a57be36f968f2de8c4c1c555ebb714 Signed-off-by: Nick Boldt <[email protected]>
…eclipse-che/che#21795 [devfile reg] Change-Id: I51469f618ffcef37d1e684ad6bef9eb1d598e665 Signed-off-by: Nick Boldt <[email protected]>
…eclipse-che/che#21795 [devfile reg] (#851) Change-Id: I51469f618ffcef37d1e684ad6bef9eb1d598e665 Signed-off-by: Nick Boldt <[email protected]> Signed-off-by: Nick Boldt <[email protected]>
…eclipse-che/che#21795 [plugin reg] Change-Id: I59a88d6f55d54f7eda87b0b91e5baec15c3e9252 Signed-off-by: Nick Boldt <[email protected]>
…eclipse-che/che#21795 [plugin reg] (#852) Change-Id: I59a88d6f55d54f7eda87b0b91e5baec15c3e9252 Signed-off-by: Nick Boldt <[email protected]> Signed-off-by: Nick Boldt <[email protected]>
Testing comments on PRs from Jenkins in these two PRs: |
…appens in eclipse-che/che#21795 [plugin reg] (#852)" This reverts commit 4cfad4c.
…appens in eclipse-che/che#21795 [plugin reg] (#852)" (#853) This reverts commit 4cfad4c.
…eclipse-che/che#21795 [plugin reg] Change-Id: I59a88d6f55d54f7eda87b0b91e5baec15c3e9252 Signed-off-by: Nick Boldt <[email protected]> Signed-off-by: Nick Boldt <[email protected]>
…eclipse-che/che#21795 [plugin reg] (#856) Change-Id: I59a88d6f55d54f7eda87b0b91e5baec15c3e9252 Signed-off-by: Nick Boldt <[email protected]> Signed-off-by: Nick Boldt <[email protected]> Signed-off-by: Nick Boldt <[email protected]>
Didn't work, need full 40-char SHAs: https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/merge_requests/1410 And need to check redhat-developer/devspaces@fe653f6 Trying again... |
…eclipse-che/che#21795 [plugin reg] This reverts commit c6007f8.
…eclipse-che/che#21795 [plugin reg] (#857) This reverts commit c6007f8.
Worked for plugin reg comment, but didn't work for sync-to-downstream. Fix: https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/merge_requests/1414/diffs Testing: https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/DS_CI/job/pluginregistry_3.x/125/ --> redhat-developer/devspaces#857 |
…eclipse-che/che#21795 [plugin reg] This reverts commit 9f3c97f.
…eclipse-che/che#21795 [plugin reg] (#858) This reverts commit 9f3c97f.
…eclipse-che/che#21795 [plugin reg] (#857) This reverts commit c6007f8.
…eclipse-che/che#21795 [plugin reg] (#857) (#859) This reverts commit c6007f8.
Working for the test example eclipse-che/che-machine-exec#225 However the links to the job need to be regex-replaced so they are absolute links, not relative ones. TODO:
Then:
For these 2 repos, we will need a secondary webhook setup that can watch for config changes but NOT changes already synced from upstream, eg., a config change like redhat-developer/devspaces-images#353
Other jobs to consider enabling:
|
Testing with: https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/DS_CI/job/push-latest-container-to-quay_3.x/1099/ Results pushed to: eclipse-che/che-machine-exec#229 ... but also to eclipse-che/che-operator#1564 (comment) so we need to tweak the template_3.x job so that it checks if comments_url is set BEFORE just searching for the latest commit from the current source repo, instead of this:
|
Fix: https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/merge_requests/1427 + https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/merge_requests/1428 + https://gitlab.cee.redhat.com/codeready-workspaces/crw-jenkins/-/merge_requests/1429 Have verified that traefik rebuilds (because they're keyed to a tag, not a branch) will no longer put comments on PRs, per redhat-developer/devspaces-images#357 and traefik/traefik#9515 (comment) Results should be here: eclipse-che/che-machine-exec#229 (comment) ... but not eclipse-che/che-operator#1564 ... so there's still a bug causing existing comments_url values to be overwritten :( DONE:
For these 2 repos, we will need a secondary webhook setup that can watch for config changes but NOT changes already synced from upstream, eg., a config change like redhat-developer/devspaces-images#353
==> moved to https://issues.redhat.com/browse/CRW-3550
|
this PR eclipse-che/che-machine-exec#230 shows a nearly perfect build record:
Then a second build cycle started for operator-bundle:
|
even better build record: eclipse-che/che-server#386 (dsc job failed, copyIIB successful 2x!)
DONE: |
Is your enhancement related to a problem? Please describe
Purpose here is to automate the flow of information so that when a PR merge / commit happens upstream, that SHA / branch can be more easily associated w/ a downstream DS 3.x build.
Repos affected include:
For these repos, we will need a secondary webhook setup that can watch for config changes but NOT changes already synced from upstream, eg., a config change like redhat-developer/devspaces-images#353
Describe the solution you'd like
Downstream Jenkins job could...
check out upstream code
find pull request #
use GH api to comment on the PR with links to the job URL (console + changes); see also https://kb.novaordis.com/index.php/Jenkins_currentBuild
when the job triggers its downstream process, could then pass the upstream PR URL to the next job, and add more comments as each build completes.
you would then end up with 2-4 comments on the PR for each build, ending with a link to the quay image (and possibly the IIBs associated w/ the build too)
Describe alternatives you've considered
GHA that watches for changes in quay?
Additional context
Discussed during this current sprint's retrospective last week
The text was updated successfully, but these errors were encountered: