siamaksade / openshift-jenkins-demo

CI/CD Demo on OpenShift
http://www.openshift.com
530 stars 928 forks source link

ERROR: Error running start-build on at least one item: [buildconfig/myapp-docker] #101

Closed prabhurgit closed 5 years ago

prabhurgit commented 5 years ago

Issues with the start-build: ERROR: Error running start-build on at least one item: [buildconfig/myapp-docker]; {reference={}, err=Uploading file "target/PaymentsWS-0.1.0.war" as binary input for the build ... Error from server (BadRequest): unable to wait for build myapp-docker-1 to run: timed out waiting for the condition, verb=start-build, cmd=oc start-build buildconfig/myapp-docker --from-file=target/PaymentsWS-0.1.0.war --wait -o=name --server=https://172.30.0.1:443 --namespace=myapp1 --token=XXXXX , out=, status=1}

oc version: oc v3.7.1+ab0f056 kubernetes v1.7.6+a08f5eeb62 features: Basic-Auth

Here is the Jenkins file:

pipeline { environment{ def appName = "myapp" def project = "myapp" } agent { label 'maven' } stages { stage('Build App') { steps { checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, \ extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'jenkins-ssh-key', \ url: 'ssh://git@hidden/PaymentsWS.git']]]) sh "mvn -s eclipse/MavenSettings/settings.xml clean package" } } stage('Create Image Builder') { when { expression { openshift.withCluster() { return !openshift.selector("bc", "${appName}-docker").exists(); } } } steps { script { openshift.withCluster() { openshift.newBuild("--name=${appName}-docker", "--image-stream=redhat-openjdk18-openshift:1.1", "--binary") } } } } stage("Build Image") { steps { script { openshift.withCluster() { openshift.selector("bc", "${appName}-docker").startBuild("--from-file=target/PaymentsWS-0.1.0.war", "--wait") } } } } stage("Deploy") { steps { script { openshift.withCluster() {
openshiftDeploy deploymentConfig: appName, namespace: project } } } } } }

siamaksade commented 5 years ago

Your issue is not related to this github repository! I close it for now. Open again if you have issues with the demo in this repository.