-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New S3-plugin features for S3 artifacts management #2
Conversation
so just say so. Signed-off-by: Brice Figureau <brice@daysofwonder.com>
It's very useful when running a master outside of AWS EC2 but with slaves on EC2. There is no possibility yet to allow the previous way of working. Signed-off-by: Brice Figureau <brice@daysofwonder.com>
This adds a checkbox in the Publish S3 configuration view of a job, to either publish to S3 from the slave or the master. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
This also adds an "S3 Artifact" links to the run side panel to have a direct access to the uploaded artifacts. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
This new extension allows to copy artifacts uploaded to S3 by a previous run to the current build workspace, like the "Copy Artifacts" plugin does. It also fingerprint downloaded artifacts to be able to link builds together. This extension requires the Copy Artifact plugin to be installed to work correctly. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
This allows to create a Destination from a run and an S3Artifact. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
This selector has no meaning for S3 artifacts copy. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
* removes the s3url field from FingerprintRecord * adds an S3ArtifactAction download action that creates a presigned S3 url for the given artifact Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
This prevents unit test to run and this file isn't used. Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Thank you - I can now build and create the s3.hpi file. I'll test some more later in the week. |
Disappointingly I've not been able to progress testing this week. I thought I'd be able to this weekend, but I'm going to be away and I'm not sure how much time I'm going to get to work on this. But I've not forgotten about this request! Just apologising for not moving faster on it. |
I tried to drop the s3.hpi into my ~/.hudson/plugins directory under Jenkins 1.456 and the received the following errors during startup:
and
I did this in the hope of retaining my existing S3 plugin settings. I then removed in ~/.hudson/plugin/s3* files and folders and restarted and uploaded the s3.hpi from the advanced tab of the plugin manager in Jenkins. Doing this produced the "Failed Initializing plugin s3" error above. I removed my ~/.hudson directory and tried again, and I still get the above errors. I rebuilt the s3 plugin against 1.456 and the same problem continued. Can you suggest what I should do next? |
The patch adds the S3 Copy Artifact feature that unfortunately requires to have the Copy Artifact plugin installed. This is I guess the cause of the first stack trace. We could theoretically remove this dependency, but we'll have to copy or re-implement code from this plugin. Normally your previous S3 plugin settings should be compatible. |
Thank you - I'll try that. A thought: is there a way to add the copyartifact code as a library dependency in the POM? That is, use the code from the plugin without having to make the user install a separate plugin? I don't know if that's even possible. |
It is already in the POM, as I've followed these instructions: |
Thank you - I've installed the plugin, ran a project, and it produced files on S3. One change is the output on S3 is in a structure based on the project name and build number. In my case it's called: jobs/oth/5/output-1.0-SNAPSHOT.jar That's a big change from the current plugin which leaves files in the top-level of the bucket you specify. Is there a setting to allow the plugin to produce the older behaviour? |
No, there is no option to restore the old behavior (it looks like I completely forgot this). |
Ok! Sounds good. I'll look out for that update. |
Is there any progress on this change set or should we close this one? |
incompatible change to bucket layout is a blocker imho. User expect plugin to be backward compatible and this will break the build chain. Should be an option, that S3CopyArtifact enables when used, but not the "classic" publisher (by default) |
Grr, I missed your last two comments because of the new github notifications. |
This would really be great to have merged in... Any chance we can motivate you to get it pulled in? |
That's still on my list of things to do :) Meanwhile you can build my patched version if you really need the functionality (I'm running it on production without any issues since I proposed this PR). |
If you need motivation, @masterzen then have another vote. The current behavior of the S3 plugin is a huge blocker for us, since we need the hierarchy in our S3 bucket for our releases. |
@jrabbe I'm motivated :) Meanwhile you can clone the repository, build the plugin ( We're using it in production to host our artifacts on s3 for more than 2 years without any adverse effect. It is the base of some very complex pipelines where artifacts are stored in s3 and automatically downloaded in the next stage of the pipeline, etc... |
Hi Guys, I currently use the s3-plugin as is for deploing finished artifacts and delivering them afterwords via cloudfront or s3. We need to maintain the old capability, if anything it might be better to make the feature a separate plugin that depends on the s3-plugin. So that you have a customised s3-plugin for default artifact storage that does not interfere with standard s3-plugin upload and settings. David |
@dmbeer it's easy to restore the original behavior (it's still there in fact), it just lacks the UI. |
Guys, I finally found the motivation to cleanup and finish this work, mostly clean up and restoring the original behavior of the plugin. This happened in Pull Request #19. Therefore I'm closing this one, as it has no object anymore. |
INFRA-3120 Approved-by: Tim Hawes <tim.hawes@inin.com> Approved-by: Lew Gordon <lew.gordon@inin.com>
Hi,
Here is a pull request to add to the S3 plugin several features to allow S3 to become a more integrated repository for artifacts built by jenkins. The idea is for S3 to become a substitute of the master artifact storage area.
This pull request notably adds the following features:
using EC2 slaves with a master outside EC2, to prevent uploading from slave to master then from master to S3).
This code is in production for about one week on my work jenkins installation with great success.
Please review this changeset, I'd be happy to modify it so that it can be merged upstream.
Many thanks!
Brice