Comments (12)
Someone ?
from aws-codebuild-jenkins-plugin.
Sorry to hear you're seeing poor performance in this use case. I will research the root cause, but a possible workaround could be the solution to this issue, which is to allow users to specify the path of a zip file to upload for the build. This way you could zip the source yourself in a step before the build. This feature is still pending, but I will update this issue when further progress is made.
from aws-codebuild-jenkins-plugin.
I've seen this also, but didn't realize it was the zip operation that was taking so long. I've seen this on ECS (EC2 launch type) slaves, and Fargate slaves now. Also, the operation maxes out the CPU on the Jenkins master at the same time, making all jobs, even ones running on master, take twice as long. And the job on the slave takes over 30 minutes to start (usually takes 10-20 seconds on master).
@XDexter were you able to workaround the issue by zipping the source yourself?
from aws-codebuild-jenkins-plugin.
Just an update to my comment above: as a test, I tried the following script prior to executing codebuild:
zip dir: '', glob: '', zipFile: 'src.zip'
stash includes: 'src.zip', name: 'src'
cleanWs deleteDirs: true
unstash 'src'
(stash/unstash is there so that I can delete the entire workspace prior to codebuild uploading my single file)
It took 5 seconds to zip and stash the file, and 5 seconds to clean the workspace and unstash. After this, it took about 30 seconds to kick off the codebuild project. So it definitely seems to be the zipping code in this plugin that is causing the slowdown.
from aws-codebuild-jenkins-plugin.
Hi @Petezah
I got it, my temporary workaround was ran the awscodebuild command on master node (and no in slave). Yes, i did the same test (zip manually on slave container and all works normally).
Regards
from aws-codebuild-jenkins-plugin.
Until the feature I mentioned is implemented, a workaround could be to zip and upload your source to S3 manually, then use that source to run the build on CodeBuild. Not ideal, but we plan to make this use case easier in the future.
from aws-codebuild-jenkins-plugin.
I believe the issue is that when a slave is running this step, the Master is trying to zip files that exist on the Slave--ie. the zip file is being built on the Master while files are being read off of the slave. This is potentially really slow over IPC. The solution would be to run the whole process on the Slave, and send the whole zip file to the master if necessary.
I'm seeing if I can plumb up a solution, hopefully.
from aws-codebuild-jenkins-plugin.
No, sorry, I misspoke; the files being zipped are on the Slave--they are streamed over IPC to the Master and zipped, and streamed back over IPC into the zip file, which also exists on the Slave. So the zipping action occurs on the Master process, but the files all exist on the Slave. The reason the Zip utility step, mentioned above, is faster is because the whole thing happens inside a MasterToSlave callable.
from aws-codebuild-jenkins-plugin.
I have tested this PR on a local instance + one of my remote slaves, and it fixes the issue for me.
from aws-codebuild-jenkins-plugin.
@Petezah It's looks good! @leobaran-aws It's possible merge this PR to master? To be possible i install on my Jenkins?
from aws-codebuild-jenkins-plugin.
Fixed by 69244e3, which will be released in version 0.28 this week.
from aws-codebuild-jenkins-plugin.
Thank you!
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.