| Summary: | Pipeline build should be failed when related build fail | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Dongbo Yan <dyan> |
| Component: | ImageStreams | Assignee: | Gabe Montero <gmontero> |
| Status: | CLOSED ERRATA | QA Contact: | Wang Haoran <haowang> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.3.0 | CC: | aos-bugs, jokerman, mmccomas, tdawson |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: the build step in OpenShift Pipeline Plugin for Jenkins did not fully check during a certain wait loop the status of Builds running in OpenShift
Consequence: Jobs in Jenkins with OpenShift Pipeline Plugin builds steps would wait the full timeout duration unnecessarily before failing a given Jenkins job if the corresponding Build in OpenShift failed much sooner.
Fix: Properly check the OpenShift Build status during the wait polling from Jenkins job leveraging the OpenShift Pipeline Plugin for Jenkins build step.
Result: Jenkins jobs will fail immediately if a corresponding Build in OpenShift fails.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-09-27 09:10:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Dongbo Yan
2016-08-24 09:34:15 UTC
OK, I've "repro'ed" and know what is going on. It technically will fail, you just have to wait long enough. The default build wait time is 15 minutes. That said, there was a change on Jul 25 https://github.com/openshift/jenkins-plugin/commit/a571787293a757c4cf2a127bfccddff1d4b9c49f that actually did not make v1.0.21, though that might seem confusing if you look at the commits on github.com/openshift/jenkins-plugin. v1.0.21 cut on jenkinsci/openshift-pipeline-plugin on Jul 13, but I didn't merge the version change to openshift/jenkins-pipeline until Jul 25 as well. I'll confirm the fix noted above performs the fast fail. If so, I would think we only need one of the recent bug's opened to drive the plugin version change / image gen. If for some reason the existing fix does not fail fast in the pipeline / dsl scenario (the work I did upstream with Oleg Popov only verified fast fail for classic freestyle jobs), I'll use this bug to drive the additional change to the plugin. Yep, the fast fail fix handled this:
OpenShift Build pipelineproject/sample-pipeline-2
[Pipeline] node
Running on maven-e568b88dcdb in /tmp/workspace/sample-pipeline
[Pipeline] {
[Pipeline] stage (build)
Entering stage build
Proceeding
[Pipeline] openshiftBuild
Starting the "Trigger OpenShift Build" step with build config "ruby-sample-build" from the project "pipelineproject".
Started build "ruby-sample-build-2" and waiting for build completion ...
Downloading "https://github.com/openshift/foo-bar" ...
error: build error: failed to fetch requested repository "https://github.com/openshift/foo-bar" with provided credentials
Downloading "https://github.com/openshift/foo-bar" ...
error: build error: failed to fetch requested repository "https://github.com/openshift/foo-bar" with provided credentials
Downloading "https://github.com/openshift/foo-bar" ...
error: build error: failed to fetch requested repository "https://github.com/openshift/foo-bar" with provided credentials
Exiting "Trigger OpenShift Build" unsuccessfully; build "ruby-sample-build-2" did not complete successfully within the configured timeout of "900000" ms; last reported status: [Failed].
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: "Trigger OpenShift Build" failed
Finished: FAILURE
After talking with Ben, I'll leave this open (since it is a separate commit in the repro for this fix) and move onto QA along with the other bugs when the image gets generated.
brew pulp latest has v1.0.22 of the plugin QE can attempt to verify Verified brew-pulp...openshift3/jenkins-1-rhel7 latest 023723e2e0ff 5 hours ago Pipeline build fail once ruby-sample-build-1 build failed Starting the "Trigger OpenShift Build" step with build config "ruby-sample-build" from the project "pipelineproject". Started build "ruby-sample-build-1" and waiting for build completion ... Cloning "https://github.com/openshiftii/ruby-hello-world.git" ... error: build error: failed to fetch requested repository "https://github.com/openshiftii/ruby-hello-world.git" with provided credentials Cloning "https://github.com/openshiftii/ruby-hello-world.git" ... error: build error: failed to fetch requested repository "https://github.com/openshiftii/ruby-hello-world.git" with provided credentials Cloning "https://github.com/openshiftii/ruby-hello-world.git" ... error: build error: failed to fetch requested repository "https://github.com/openshiftii/ruby-hello-world.git" with provided credentials Exiting "Trigger OpenShift Build" unsuccessfully; build "ruby-sample-build-1" did not complete successfully within the configured timeout of "900000" ms; last reported status: [Failed]. [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: "Trigger OpenShift Build" failed Finished: FAILURE Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1937 |