Comments (17)
@spadgett thanks, I believe I know what is going on now.
Right after the message
Exiting "Trigger OpenShift Build" unsuccessfully; build "ruby-sample-build-2" has completed with status: [Failed].
openshift-pipeline plugin returns false
. In the classic Jenkins job, that will result in the job failing. The Jenkins API in that case expects a boolean it will interpret.
However, in the very similar, yet different, class hierarchy for the pipeline stuff, the same api has avoid
return, and they appear to want you to throw a IOException or AbortException (the javadoc says that is the "polite" exception :-) ) if there was a problem.
I'll use this issue to add that logic (separate from the DSL stuff).
from jenkins-plugin.
/cc @sspeiche
from jenkins-plugin.
is that the entirety of your jenkinsfile? i know i saw the same issue where a failing build step didn't immediately fail the entire pipeline, but i didn't see it hang for 5 minutes, it just completed the pipeline. Any idea what it was doing for the rest of the time?
from jenkins-plugin.
@spadgett this had been reported by an upstream customer, and he at least had confirmed that d0481f7
had addressed the issue for him (so this is independent from / unrelated to the DSL changes).
Can you first confirm the level of the plugin you are running with?
from jenkins-plugin.
is that the entirety of your jenkinsfile?
No, I have a deploy step after the build completes.
Can you first confirm the level of the plugin you are running with?
1.0.10 now. I can try 1.0.12.
from jenkins-plugin.
Yeah, the fix went into 1.0.11; if for some reason 1.0.12 does not solve it for you, I'll dive into how to debug.
from jenkins-plugin.
@gabemontero I think there are two problems here
- The build in Jenkins takes a long time to fail
- The build stage is marked as successful in the pipeline
1.0.12 solves (1), but not (2). The stage in the pipeline is successful even though the s2i build failed
@bparees I was able to reproduce this with your pipeline templates by editing the bc/ruby-sample-build to use a bogus source URL
from jenkins-plugin.
@spadgett can you show me the console output?
from jenkins-plugin.
Jenkins console log:
OpenShift Build pipelineproject/sample-pipeline-2 from https://github.com/openshift/ruby-hello-world
OpenShift Build pipelineproject/sample-pipeline-2 from https://github.com/openshift/ruby-hello-world
[Pipeline] Allocate node : Start
Running on 79f36425cb3 in /home/jenkins/workspace/sample-pipeline
[Pipeline] node {
[Pipeline] stage (build)
Entering stage build
Proceeding
[Pipeline] step
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 ...
Build logs:
W0524 15:06:27.388433 1 builder.go:55] Master version "v1.3.0-alpha.0-660-g5f098ef-dirty" does not match Builder image version "v1.3.0-alpha.0"
I0524 15:06:27.571288 1 source.go:197] Downloading "https://github.com/openshift/ruby-hello-world.git.bogus" ...
F0524 15:06:28.288366 1 builder.go:204] Error: build error: failed to fetch requested repository "https://github.com/openshift/ruby-hello-world.git.bogus" with provided credentials
Exiting "Trigger OpenShift Build" unsuccessfully; build "ruby-sample-build-2" has completed with status: [Failed].
[Pipeline] stage (deploy)
Entering stage deploy
Proceeding
[Pipeline] step
Starting "Trigger OpenShift Deployment" with deployment config "frontend" from the project "pipelineproject".
Exiting "Trigger OpenShift Deployment" successfully; deployment "frontend-2" has completed with status: [Complete].
[Pipeline] } //node
[Pipeline] Allocate node : End
[Pipeline] End of Pipeline
Finished: SUCCESS
All pipeline stages are succesful:
Here is my Jenkinsfile (from @bparees pipeline template openshift/origin#8973)
node('agent') {
stage 'build'
def builder = new com.openshift.jenkins.plugins.pipeline.OpenShiftBuilder("", "ruby-sample-build", "pipelineproject", "", "", "", "", "true", "", "")
step builder
stage 'deploy'
def deployer = new com.openshift.jenkins.plugins.pipeline.OpenShiftDeployer("","frontend","pipelineproject","","")
step deployer
}
from jenkins-plugin.
so the issue is either:
- the openshift plugin isn't reporting that the step failed
- the jenkins pipeline plugin doesn't actually fail the pipeline when a step fails.
i don't know enough about either to speculate where the problem actually is.
from jenkins-plugin.
but apparently @gabemontero does :)
from jenkins-plugin.
@spadgett try installing this version of the plugin
from jenkins-plugin.
Here is the associated commit
from jenkins-plugin.
Works great. Thanks @gabemontero
ERROR: The OpenShift Build Step com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep was unsuccessful
I'd suggest changing the message if possible.
from jenkins-plugin.
Cool deal. Changes to the message are possible - do you have a specific
suggestion for the message?
On Tue, May 24, 2016 at 1:56 PM, Sam Padgett [email protected]
wrote:
Works great. Thanks @gabemontero https://github.com/gabemontero
ERROR: The OpenShift Build Step
com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep was unsuccessfulI'd suggest changing the message if possible.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#41 (comment)
from jenkins-plugin.
I think just "ERROR: OpenShift build failed." or "ERROR: OpenShift deployment failed." etc. are more clear.
from jenkins-plugin.
OK, I went with our "meticulously" crafted "official" step titles :-) ... i.e.:
ERROR: "Trigger OpenShift Build" failed
Going ahead and marking this closed.
from jenkins-plugin.
Related Issues (20)
- Patch / Update resources HOT 9
- jenkins template using spec.clusterIP instead of spec.portalIP HOT 2
- Build output sometimes not shown in jenkins console output HOT 2
- Deployments don't work HOT 3
- Environment Variables don't respect Parameterised Builds HOT 6
- Timeout of builds HOT 3
- Unable to do openshiftTag() in pipeline HOT 1
- FR: Support of variables inside Openshift Exec HOT 9
- BUG: "Test connection" always returns "Connections successful" HOT 11
- BUG: OpenshiftExec ignores timeout HOT 12
- Confusing print statement if openshiftVerifyDeployment fails HOT 1
- okhttp binary changes break plugin when others installed HOT 11
- Externalize the CERT_FILE = "/run/secrets/kubernetes.io/serviceaccount/ca.crt"; HOT 7
- Issue with Jenkin's Verify Build OpenShift plug-in functionality HOT 9
- Declarative pipeline support? HOT 4
- openshift-client-plugin really still a "tech preview" ? HOT 3
- Jenkins throws an error when using the openhiftBuild with the buildConfig parameter HOT 3
- Resulting GDSL is Broken HOT 2
- openshiftBuild should support binary build type. HOT 10
- Add deprecation warning and link to new plugin as first thing in repo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jenkins-plugin.