The file is not non-static in the jenkins server slave machine

I used ubundu as the jenkins server master machine and configured the windows machine as a slave. I tried to hide and unzip the file from the wizard to the working work plan, but it is not unwound.

node('slave') { node('master'){ stash includes: "file.tgz" name: "master-stash" } unstash "master-stash" bat "ls" } 

Output:

 [Pipeline] node Running on master in /var/lib/jenkins/workspace/testing [Pipeline] { [Pipeline] stash Stashed 1 file(s) [Pipeline] } [Pipeline] // node [Pipeline] unstash 

The file can be hidden from the master, but it is not smudged in the workspace of the slave.

jenkins: 2.35

0
source share
1 answer

I solved the problem with an unstable application by adding the root folder to the package. I do not know why this is not a non-static single file, but it can unlock the root folder with the file.

 node('slave') { node('master'){ stash includes: "rootFolder/file.tgz" name: "master-stash" } unstash "master-stash" bat "ls" } 

An unused file can be obtained from rootFolder / file.tgz of the current workspace.

0
source

Source: https://habr.com/ru/post/1273739/


All Articles