Copy the generated folder from one job to another in Hudson / Jenkins

I have two works in my Hudson configuration. Let me call them A and B.

Job A was created specifically to create the application_home folder. This folder is a ready-to-use-in-installation-application-home-folder.

Task B is "all together for installation-task". To create the installer, you need to copy the application_home generated by task A. My problem is that after some investigation, I could not do it in a simple way.

I could use a shell script, but then I would need to know the path to the job plus, where its workspace should get the application’s home folder.

Is there an easier way to do this?

EDIT

I know Copy artifact plugin . The problem is that it only copies artifacts. I need to copy the application_ home folder as it is, because it is already in the structure that will be used in the installer. If there is a way to use this plugin to copy only a folder, I did not find it.

EDIT 2. Answer:

Well, you can do this using the Copy Artifact Plugin . You need

  • Define your configuration to "copy from WORKSPACE the last completed build."
  • Install Artifacts to copy the parameter to the folder: target / application_home / **
  • Set the target directory to where you want something like: install_bundle_folder / application_home.

and it is done :)

+6
source share
2 answers

You can try copy artifact poster .

You can then add the build step to package-all-together-for-install-job, which would copy application_home to the packaging directory. It is possible to include only the latest stable build of project A.


Another alternative is to create a post-build phase for a successful build of Project A, which copies a copy of application_home to where Project B will be used. You can use the WORKSPACE environment variable to get an absolute location. (See here for a list of environment variables.)

+3
source

Well, you can do this using the Copy Artifact Poster . You need

Set your configuration to "copy from WORKSPACE of latest completed build" Install Artifacts to copy the parameter to a folder as follows: target/application_home/** Set the target directory to where you want something like: installation_bundle_folder/application_home .

and it is done :)

+1
source

All Articles