Jenkins, SSH plugin, 0 files transferred

We are a group of three executing a project using MEANJS, Bitbucket is our source of control, and we use Jenkins to automate testing and CI. We want to use Jenkins to pull out from Bitbucket, build and run tests, and then deploy the project via SSH to another machine.

We have a connection between Bitbucket and Jenkins, Jenkins is hosted on a Windows server, after which we want to deploy our project via SSH, and we can connect to our CentOS server using SSH, the connection is successful, but the transfer always has 0 files:

Started by user Centris Building in workspace C:\Program Files (x86)\Jenkins\workspace\Evert > C:\Program Files (x86)\Git\cmd\git.exe rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > C:\Program Files (x86)\Git\cmd\git.exe config remote.origin.url https://evertJenkins: teamEvert@bitbucket.org /evert-team/evert.git # timeout=10 Fetching upstream changes from https:// evertJenkins@bitbucket.org /evert-team/evert.git > C:\Program Files (x86)\Git\cmd\git.exe --version # timeout=10 using .gitcredentials to set credentials > C:\Program Files (x86)\Git\cmd\git.exe config --local credential.helper store --file=\"C:\Users\centris\AppData\Local\Temp\git2236090933781388612.credentials\" # timeout=10 > C:\Program Files (x86)\Git\cmd\git.exe fetch --tags --progress https:// evertJenkins@bitbucket.org /evert-team/evert.git +refs/heads/*:refs/remotes/origin/* > C:\Program Files (x86)\Git\cmd\git.exe config --local --remove-section credential # timeout=10 > C:\Program Files (x86)\Git\cmd\git.exe rev-parse "origin/master^{commit}" # timeout=10 Checking out Revision b0ca93376cb8b1799a069a7e33e212ebc886261a (origin/master) > C:\Program Files (x86)\Git\cmd\git.exe config core.sparsecheckout # timeout=10 > C:\Program Files (x86)\Git\cmd\git.exe checkout -f b0ca93376cb8b1799a069a7e33e212ebc886261a > C:\Program Files (x86)\Git\cmd\git.exe rev-list b0ca93376cb8b1799a069a7e33e212ebc886261a # timeout=10 > C:\Program Files (x86)\Git\cmd\git.exe tag -a -f -m Jenkins Build #39 jenkins-Evert-39 # timeout=10 SSH: Connecting from host [centris] SSH: Connecting with configuration [Centris leit] ... SSH: Disconnecting configuration [Centris leit] ... SSH: Transferred 0 file(s) Build step 'Send files or execute commands over SSH' changed build result to SUCCESS SSH: Connecting from host [centris] SSH: Connecting with configuration [Centris leit] ... SSH: Disconnecting configuration [Centris leit] ... SSH: Transferred 0 file(s) Finished: SUCCESS 

Our project is called Evert and therefore it is under the \ Evert workspace.

We tried all line forms for our source files from the full path to what we have now:

 Evert\**\* 

We will also remove the prefix as:

 Evert\ 

we tried the following: Jenkins uploaded 0 files using publishing via the SSH plugin , but we still have the same problem. Someone can tell us what could be the problem.

+6
ssh jenkins
source share
2 answers

You can simply archive it and print the archive on a CentOS computer. Not all Jenkins plugins are created equal.

+1
source share

I had this problem and I found 2 problems:

  • the files in the transfer set belong to the workspace of the job. Therefore you just use **
  • setting the target directory in the SSH server settings and on the SSH server in the build configuration causes it to double the path (i.e. /tmp in both places leads to /tmp/tmp )
0
source share

All Articles