Jenkins---Build project jar package on Windows upload to Linux

Source: Internet
Author: User
Tags pscp

February 05, 2018 11:02:17 read: 851

1, how to build the jar package can refer to the following link: http://blog.csdn.net/zk0920zk/article/details/79230707

2, next talk about how to upload files to Linux via Windows bat

Add Windows Batcht Code

    1. Echo "Start uploading Files"
    2. Pscp-l name-pw password-r h:/a.csv name@ip:/usr/local/beta
    3. echo "Upload file succeeded"
    4. Exit

Name is the Linux login user name, password is the password, IP is the address of the Linux, after the execution of the command found that hit jar package did not succeed, reported the following error

It is necessary for us to actively enter the Y consent to upload, then in the execution of the bat file, how to automatically enter Y, very simple, first in the local create a TXT file anywhere, the name randomly, enter Y and then line, save the file, the file modified to the bat format.

Pscp.exe has a redirect command, we can redirect to the new bat file, the modified code is as follows A.csv is a random file used for testing

    1. Echo "Start uploading Files"
    2. Pscp-l name-pw password-r h:/a.csv name@ip:/usr/local/beta < H:/confirm.bat
    3. echo "Upload file succeeded"
    4. Exit

Rebuild projects to build success

This file was also found under Linux-specified folders

Jenkins---Build project jar package on Windows upload to Linux

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.