Community
Participate
Working Groups
With Hudson 3.0.0 RC-4, when Hudson process A have a build task "Copy artifacts from another project" to get "Latest successful build" from Hudson process B; if the Hudson process B has successful build artifacts BUT is running at the time process A tries to get the artifacts, then the process A will fail.
Hi Daniel, which version of copyArtifacts plugin you have. I tested with 1.25-h-1 and could not reproduce the issue you mentioned. This is how I tested - Created job A and specified some files as artifacts - Created job B and specified to copy the artifacts from A only from the last successful build. It's build is only to copy artifacts. - Created few builds of A. Build #11 successful but build #13 failed. - Started build #14 of job A - While build #14 of job A was continuing, I started Job B. It successfully copied the artifacts from build #11 (last successful build of Job A) Started by user anonymous Copied 2 artifacts from "Test" build number 11 Finished: SUCCESS I don't see any issue. Please explain what exact issue you are facing.
Hello, I am using version 1.25-h-1. I use the parameters "Specified by permalink" Permalink: Last Build. I want my process to fail if the build from which I copy artifacts hasn't created archives. I just had the issue this morning, my build process B failed because build process A was still running. Thanks for looking into this.
Hi Daniel, could you please explain more on "I use the parameters "Specified by permalink" Permalink: Last Build". Are you using any plugin to set this?
Hello, the copyArtifacts plugin has a few parameters. By default it is configured to copy the latest "successful build". But you can change the parameters to take another one, for example a build that was marked specially, etc. I use the parameter to take the latest build. I will add a screen shot.
Created attachment 228277 [details] My configuration see my parameters.
With the schedule tight to the release of Kepler we are concentrating on new features in Hudson. The bugs assigned for fixing in 3.0.2 will now be fixed as part of the 3.1.0 release due June 26th. Please raise anything you think to be too important to wait by adding a comment to the bug.
The configuration you attached conflicts with the stated goal. You asked for the last build, not the latest successful build. If the last build is running at the time A runs and hasn't produced artifacts yet, sure enough, A will fail. If you set up copy artifacts from "Latest successful build", it will work fine. If you truly want the artifacts from the "latest build", and to have job A fail if the latest build doesn't produce artifacts, you should use the parameterized trigger plugin in B to trigger A Always (be sure to check "Trigger build without parameters"). Then A won't run until last B build ends, but will run regardless of build status.
Then I guess my issue is then a request to have a new option like 'Latest completed build'? I don't see how much it makes sense to be able to link to something that will sometime not be available, what do you think?
No, but I don't understand why using the parameterized trigger plugin as I described earlier or using "Copy from WORKSPACE of latest completed build" won't solve your problem without any new options.
Wow, that was a stupid question...sorry. I never realized there was this option "Copy from WORKSPACE of latest completed build". This solves my problem. Thank you very much!
Ooups, this actually doesn't solve my problem. I made the modification to my processes. So Process A, tries to gets the artifacts from Process B with the setting "Copy from WORKSPACE of latest completed build". Now pretty much exactly at the same time that Process A runs, process B kicks in again and starts a new build of itself (build 630). Meanwhile in Process A, I got Copied 0 artifacts from "Voyager(trunk)Eclipse-Encryption-Hook-feature-CI-Daily" build number 629 Why? I just re-ran the Process A and this times it goes through and successfully gets the 1 artifact from my Process B. So apparently I can get in the same kind of "timing" issue with the setting "Copy from WORKSPACE of latest completed build". I don't want to be forced to put all my processes as dependencies in my process A, getting artifacts should just work in my opinion.
I don't know why Copy from WORKSPACE of latest completed build didn't work as you expected, except of course if you had no latest completed build. But I don't agree that "copy artifacts should just work". You are essentially asking for job B to wait for job A's latest build to complete and fail if A produced no artifacts, an effect you can easily get by from the parameterized trigger plugin by launching the B build whenever an A build completes (Always/no parameters).
But perhaps I just don't understand your setup. What triggers B? Does B do something useful before it gets artifacts from A?
Hello, perhaps we have different expectations here. To answer your question, process A doesn't do much before getting the files from B, it checks out additional files and then gets the artifacts from B (and from C, D, an Z), then does something useful with all of them. The problem is that B, C, D and Z are triggered on commits, do validations and produce outputs. Sometime C may take longer than B to complete, sometime B will take longer than C to complete, but only B triggers A. There lies my problem that I never quite know for sure if B, C, D and Z are completed when I start running A. It could even be so that C is relaunched during the running of A, therefore causing the artifacts of "latest successful build" to not be available before the build is not completed yet. My expectation is that I should be able to get the archived artifacts from a build from the latest successful (or completed) build, whatever the process is running or not. To me a running process is neither successful nor completed... What am I missing?
Bulk deferral to 3.1.1