Comments (6)
Thanks for letting us know about this. I'll attempt to reproduce it and then diagnose the root cause.
from aws-codebuild-jenkins-plugin.
The issue here is that the plugin does not recognize the step([$class : 'CodeBuilder'
syntax as a pipeline step. One workaround is to replace that with awsCodeBuild
(see the pipeline snippet generator). Another option is to check the build status after the build and throw an exception if the status is failed:
script {
if(currentBuild.result == "FAILURE") {
throw new Exception()
}
}
from aws-codebuild-jenkins-plugin.
I am facing same issue with following configuration:
stage('package') {
steps {
withCredentials([[$class: 'AmazonWebServicesCredentialsBinding', credentialsId: 'aws']]) {
awsCodeBuild credentialsId: 'CodeBuild', credentialsType: 'jenkins', projectName: 'Package', region: 'us-east-1', sourceControlType: 'project', sourceVersion: "${params.COMMIT_HASH}", envVariables: "[{BUILD_SCRIPT, docker/package/pack.sh}, {JENKINS_BUILD_NUMBER, ${env.BUILD_NUMBER}}, {AWS_SECRET_ACCESS_KEY, ${env.AWS_SECRET_ACCESS_KEY}}, {AWS_ACCESS_KEY_ID, ${env.AWS_ACCESS_KEY_ID}}, {ARTIFACTS_BUCKET, ${env.ARTIFACTS_BUCKET}}, {BRANCH, ${env.BRANCH}}]"
}
}
}
Codebuild Plugin Version - 0.17
The build continued even though the codebuild run failed in DOWNLOAD_SOURCE
stage.
from aws-codebuild-jenkins-plugin.
Can you confirm that you're still having problems getting your use case working?
from aws-codebuild-jenkins-plugin.
this has NOTHING to do with this particular issue which remains open, but...anyone know how to access the ENV vars in the CodeBuild buildspec.yml when they are supplied by this plugin? @vedarthk has envVariables listed in his Jenkins Pipeline file, I want to know how to access these vars in the CodeBuild environment...sorry if it derails the convo...
from aws-codebuild-jenkins-plugin.
Hi,
If using try { cbResult = awsCodeBuild ....} catch {}
(as advised here https://issues.jenkins-ci.org/browse/JENKINS-61259?focusedCommentId=386419&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel)
Even if one of the CodeBuild phases fails in the previous stages the other stages continue
So to work around it I have to add:
if(currentBuild.result == "FAILURE") {
throw new Exception()
}
Is that something that can be fixed?
from aws-codebuild-jenkins-plugin.
Related Issues (20)
- Config setting to override image pull credentials type
- The time of the build at the plugin differs from Codebuild
- Can't download artifacts from S3 HOT 1
- Artifacts download to workspace on Jenkins master rather than slave
- Running CodeBuild on Docker Container uses Master Role and NOT Agent Role
- Unable to stream cloudwatch logs HOT 9
- Cannot override secondary artifact name
- Versions 0.55 and above may not work on Jenkins 2.319 HOT 1
- Unable to specify variable type in environment variables override
- Which is the main repository? HOT 3
- Support file modes in "Use Jenkins source" HOT 1
- Support include/exclude file patterns in "Use Jenkins source" HOT 1
- Parallel execution with "Use Jenkins source" results S3 upload error and strange error message HOT 5
- Inconsistant Jenkins target version
- Question: when git clone depth override is empty
- Source Override does not work for AWS Gov Cloud
- CodeBuildException on zip and upload HOT 2
- Environment Variable Override Does Not Accept pipe '|' character
- Support for GPU based codebuild container HOT 2
- environment directive gets ignored
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 aws-codebuild-jenkins-plugin.