Transfer files between different slave in Jenkins

Source: Internet
Author: User

Scenario: We have more than one slave on Jenkins, and sometimes we want to get the results of a job build from another slave, which is used by another job on our machine. For example, in a slave to the iOS source code compiled into an IPA file, and in B slave another job to get the IPA package installed on the phone, if you do. A Slave Job configuration

Configure the Post-build actions module in config in this job and add a archive the artifacts:

Enter the files you want to archive after the file the artifacts, such as the following files in my workspace:

I want to archive install.sh, enter the following information after file the artifacts:

After the build is executed, it is discovered that the file has been archived.

throw a brick .

The above operation only saves the files we want on the A slave job machine, and how to use them in another job. B Slave Job configuration

In a job configuration panel on B slave, in the build module, select Copy artifacts from another project (you need to configure the copy Artifact plugin plugin) to configure the following information:

Project Name: Document Source Item
Which build: Which build (I chose the latest successful build)
Stable build only: Gets when the build is successful
Artifacts to copy: document name, passed file name
Artifacts not to copy: Do not need to pass the file, filter function
Target directory:copy to native storage directory

After the build, open the working directory, you will find that the current working directory more than one file:

done!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.