声明性Jenkinsfile CIFS共享

问题描述 投票:3回答:1

我有另一个关于詹金斯管道的问题。

如何将构建工件发布到Windows共享?在正常构建作业中,有一个“CIFS Publisher”构建后操作。但我怎么能用它呢

post{
    success {
       //publish build artifacts
    }
}

有什么例子吗?

jenkins jenkins-pipeline
1个回答
3
投票

我用这种方式成功地管理了它:

cifsPublisher alwaysPublishFromMaster: false, continueOnError: false, failOnError: false, publishers: [[
  configName: 'NAME_OF_THE_CIFS_CONFIG', transfers: [[
    cleanRemote: false, 
    excludes: '', 
    flatten: false, 
    makeEmptyDirs: false, 
    noDefaultExcludes: false, 
    patternSeparator: '[, ]+', 
    remoteDirectory: '$BUILD_NUMBER', 
    remoteDirectorySDF: false, 
    removePrefix: '', 
    sourceFiles: 'myfile']], 
  usePromotionTimestamp: false, 
  useWorkspaceInPromotion: false, 
  verbose: true
]]
© www.soinside.com 2019 - 2024. All rights reserved.