藏匿处没有将文件放在子文件夹中



我想将所有名为" myfiles 的文件都存放在名为" myfolder"的子文件夹中,无法弄清楚为什么这是不起作用的:

stash name: "mystash", includes: '**/*myFiles*'

我验证了此文件的存在,情况和名称是正确的,但藏匿处仍然无法正常工作。当我解开时,我只会得到" myfolter"和空的。据我了解,藏匿处使用了蚂蚁圈语法?我的语法错了吗?

我使用下面的管道进行了测试

node {
    ansiColor('xterm') {
        stage("test") {
           sh 'mkdir bla && cd bla && touch blabmyFiles34 && touch nothing'
           sh 'touch 12myFiles'
           sh 'touch test'
           sh 'touch 13myFiles'
           sh 'touch 12myFiles3232'
           sh 'ls -la'
           stash name: "mystash", includes: '**/*myFiles*'
       }
       stage("files") {
           sh 'rm -rf *'
           unstash name: "mystash"
           sh 'ls -la'
           sh 'ls -la bla' 
       }
   }
}

这是詹金斯的输出:

[Pipeline] node
Running on US-EAST-1Ubuntu (i-) in /home/ubuntu/workspace/test-stash
[Pipeline] {
[Pipeline] ansiColor
[Pipeline] {
[Pipeline] stage
[Pipeline] { (test)
[Pipeline] sh
[test-stash] Running shell script
+ mkdir bla
+ cd bla
+ touch blabmyFiles34
+ touch nothing
[Pipeline] sh
[test-stash] Running shell script
+ touch 12myFiles
[Pipeline] sh
[test-carlos-stash] Running shell script
+ touch test
[Pipeline] sh
[test-carlos-stash] Running shell script
+ touch 13myFiles
[Pipeline] sh
[test-carlos-stash] Running shell script
+ touch 12myFiles3232
[Pipeline] sh
[test-stash] Running shell script
+ ls -la
total 12
drwxrwxr-x  3 ubuntu ubuntu 4096 Feb 15 11:43 .
drwxrwxr-x 14 ubuntu ubuntu 4096 Feb 15 11:36 ..
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 15 11:37 12myfiles
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 15 11:43 12myFiles
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 15 11:43 12myFiles3232
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 15 11:43 13myFiles
drwxrwxr-x  2 ubuntu ubuntu 4096 Feb 15 11:43 bla
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 15 11:43 test
[Pipeline] stash
Stashed 4 file(s)
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (files)
[Pipeline] sh
[test-stash] Running shell script
+ rm -rf 12myFiles 12myFiles3232 12myfiles 13myFiles bla test
[Pipeline] unstash
[Pipeline] sh
[test-stash] Running shell script
+ ls -la
total 12
drwxrwxr-x  3 ubuntu ubuntu 4096 Feb 15 11:43 .
drwxrwxr-x 14 ubuntu ubuntu 4096 Feb 15 11:36 ..
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 15 11:43 12myFiles
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 15 11:43 12myFiles3232
-rw-rw-r--  1 ubuntu ubuntu    0 Feb 15 11:43 13myFiles
drwxrwxr-x  2 ubuntu ubuntu 4096 Feb 15 11:43 bla
[Pipeline] sh
[test-stash] Running shell script
+ ls -la bla
total 8
drwxrwxr-x 2 ubuntu ubuntu 4096 Feb 15 11:43 .
drwxrwxr-x 3 ubuntu ubuntu 4096 Feb 15 11:43 ..
-rw-rw-r-- 1 ubuntu ubuntu    0 Feb 15 11:43 blabmyFiles34
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // ansiColor
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS

那是您要寻找的吗?

相关内容

  • 没有找到相关文章

最新更新