Publish over SSH plugin not transferring any files

4,477 views
Skip to first unread message

Patrick White

unread,
Mar 4, 2014, 4:39:14 PM3/4/14
to jenkins...@googlegroups.com

I want to transfer files from my post build Jenkins workspace to a location on a remote server. Build goes smoothly for all steps in the job but always transfers 0 files.

This is the console output:


Started by user Patrick
    Building in workspace /var/lib/jenkins/jobs/20eyes Build/workspace
    Fetching changes from the remote Git repository
    Fetching upstream changes from https://github.com/project/project.git
    using .gitcredentials to set credentials
    Checking out Revision a758e0f8e534271b999a2fc8696b6fd5a3d5e500 (origin/master)
    executing script:

    cd /var/www/20eyes-web
    [SSH] exit-status: 0
    SSH: Connecting from host [dev1.remotehost]
    SSH: Connecting with configuration [dev2.remotehost] ...
    SSH: Disconnecting configuration [dev2.remotehost] ...
    SSH: Transferred 0 file(s)
    Build step 'Send files or execute commands over SSH' changed build result to  SUCCESS
    Finished: SUCCESS


The job is configured to build after any commit is pushed to GitHub

The transfer set is: Source Files:

/var/lib/jenkins/jobs/20eyes Build/workspace/**/*

Remove prefix:

/var/lib/jenkins/jobs/20eyes Build/workspace

Please Help!!

Patrick

Richard Bywater

unread,
Mar 4, 2014, 4:44:12 PM3/4/14
to jenkins...@googlegroups.com
Quick thought - trying changing transfer set to "**/*" (i.e. drop directory off) as the transfer should be relative to the workspace root anyway IIRC.

Richard.


--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Patrick White

unread,
Mar 4, 2014, 4:57:17 PM3/4/14
to jenkins...@googlegroups.com
That did it! After adjusting that and some permissions changes it worked like a charm. Thanks so much for the help!!

Patrick

Richard Bywater

unread,
Mar 4, 2014, 4:59:33 PM3/4/14
to jenkins...@googlegroups.com
No problem. If I recall I think the code might deliberately ignore absolute file sets like that (as a security measure no doubt)

Richard.

Prabhu Varadhachari

unread,
Dec 24, 2019, 10:14:49 AM12/24/19
to Jenkins Users

Hello ,

I want transfer the file from Jenkins work space to remote server. Job is done but files are not transferred. Can you please help me to fix this issue. 

SNAPSHOT/server-1.0-SNAPSHOT.jar
[JENKINS] Archiving /var/lib/jenkins/workspace/Devops-project-2/pom.xml to com.example.maven-project/maven-project/1.0-SNAPSHOT/maven-project-1.0-SNAPSHOT.pom
channel stopped
SSH: Connecting from host [192.168.56.150]
SSH: Connecting with configuration [ansible-server] ...
SSH: Disconnecting configuration [ansible-server] ...
SSH: Transferred 0 file(s)
SSH: Connecting from host [192.168.56.150]
SSH: Connecting with configuration [ansible-server] ...
SSH: EXEC: STDOUT/STDERR from command [ansible-playbook /opt/playbooks/copywarfile.yml] ...
PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [192.168.56.160]

TASK [copy jar/war onto tomcat servers] ****************************************
ok: [192.168.56.160]

PLAY RECAP *********************************************************************
192.168.56.160             : ok=2    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   

SSH: EXEC: completed after 8,881 ms
SSH: Disconnecting configuration [ansible-server] ...
SSH: Transferred 0 file(s)
Finished: SUCCESS

Thanks
Prabhu V 

Slide

unread,
Dec 24, 2019, 12:14:07 PM12/24/19
to Jenkins User Mailing List
What does your file pattern look like and have you verified that the files exist that you want to transfer?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.

Richard Bywater

unread,
Dec 25, 2019, 12:15:49 AM12/25/19
to jenkins...@googlegroups.com
Looks to me like the Ansible playbook is running on the remote server but there's nothing actually copying the files to the remote server so the playbook doesn't have anything to copy.

However I've only have taken a quick peek so apologies if I've misread the situation. 

Richard. 

--

William Hetherington

unread,
Dec 25, 2019, 8:06:06 AM12/25/19
to jenkins...@googlegroups.com
Which module are you using in your Ansible playbook task?

--
William Hetherington
t - @wmwh

Seshadri Reddy

unread,
Dec 26, 2019, 8:23:55 PM12/26/19
to jenkins...@googlegroups.com
Hello sir,

Even i got the same error message, however my .war file is copied to tomcat sever from Ansible master.




Regards,
Seshadri Reddy

Reply all
Reply to author
Forward
0 new messages