Move files over SSH with jenkins outside the workspace -


i trying make job liferay plugin , make build war , transfer remote liferay portal via publish on ssh plugin.

the workspace job in sdk portlets directory. problem build script of liferay sdk creating war on directory outside workspace on higher level, relative path ../dist directory structure looks this

- sdk root + - ...   - dist (the dir war being created)   - ...   - portlets (the workspace of job)   - ... 

so, when give relative path [../dist/portlet_name.war] "source files" field of ssh publisher finds 0 files transfer:

ssh: connecting sftp channel ... ssh: connected ssh: cd [/opt/liferay-portal] ssh: ok ssh: disconnecting configuration [server_name [liferay]] ... ssh: transferred 0 file(s) 

i tried give absolute path, no success.

is there way file? in advance.

found this case,

the simplest solution copy files workspace using build step.

so need add "execute shell" step before transfering file :

# current dir job's workspace rm -fr your.file cp ../../anotherjob/workspace/target/your.file 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -