发布 ftp jenkins 插件未上传子文件夹
publish over ftp jenkins plugin is not uploading subfolder
我有一个 Jenkinsfile,它使用 Publish over FTP 插件将我的 angular 应用程序代码部署到站点。除 assets 子文件夹外,dist 文件夹中的所有文件都已传输。我尝试为 sourceFiles 参数输入以下值但没有成功:'webapp/dist/', 'webapp/dist/**', 'webapp/dist/**/*'.
这是我的 Jenkinsfile FTP 部分的发布:
stage('Deploy') {
steps {
echo 'Deploying....'
ftpPublisher paramPublish: null, masterNodeName:'', alwaysPublishFromMaster: true, continueOnError: false, failOnError: true, publishers: [
[configName: 'Angular app', verbose: true, transfers: [
[asciiMode: false, cleanRemote: true, makeEmptyDirs:true, excludes: '', flatten: false,
noDefaultExcludes: false, patternSeparator: '[, ]+',
remoteDirectory: "webapp",
removePrefix: "webapp/dist",
remoteDirectorySDF: false,
sourceFiles: 'webapp/dist/**/*']
], usePromotionTimestamp: false, `enter code here`useWorkspaceInPromotion: false]
]
}
}
我查看了 Publish over FTP 管道文档:https://jenkins.io/doc/pipeline/steps/publish-over-ftp/ 并且找不到我遗漏的任何参数。我卡住了。
我能够解决问题。我将管道的标题更改为所有小写字母,没有任何空格。然后,我通过修改 Jenkins 根目录中 config.xml 中的 workspaceDir 条目,将工作区文件夹的文件路径更改为 'C:/jenkinsworkspace/${ITEM_FULL_NAME}'。我在修改 config.xml 之前停止了 Jenkins 服务。资产文件夹和网站图标都在构建中生成。这是 https://github.com/angular/angular-cli/issues/9230 中提到的解决方案之一。感谢您的帮助@Alberto L. Bonfiglio。
我有一个 Jenkinsfile,它使用 Publish over FTP 插件将我的 angular 应用程序代码部署到站点。除 assets 子文件夹外,dist 文件夹中的所有文件都已传输。我尝试为 sourceFiles 参数输入以下值但没有成功:'webapp/dist/', 'webapp/dist/**', 'webapp/dist/**/*'.
这是我的 Jenkinsfile FTP 部分的发布:
stage('Deploy') {
steps {
echo 'Deploying....'
ftpPublisher paramPublish: null, masterNodeName:'', alwaysPublishFromMaster: true, continueOnError: false, failOnError: true, publishers: [
[configName: 'Angular app', verbose: true, transfers: [
[asciiMode: false, cleanRemote: true, makeEmptyDirs:true, excludes: '', flatten: false,
noDefaultExcludes: false, patternSeparator: '[, ]+',
remoteDirectory: "webapp",
removePrefix: "webapp/dist",
remoteDirectorySDF: false,
sourceFiles: 'webapp/dist/**/*']
], usePromotionTimestamp: false, `enter code here`useWorkspaceInPromotion: false]
]
}
}
我查看了 Publish over FTP 管道文档:https://jenkins.io/doc/pipeline/steps/publish-over-ftp/ 并且找不到我遗漏的任何参数。我卡住了。
我能够解决问题。我将管道的标题更改为所有小写字母,没有任何空格。然后,我通过修改 Jenkins 根目录中 config.xml 中的 workspaceDir 条目,将工作区文件夹的文件路径更改为 'C:/jenkinsworkspace/${ITEM_FULL_NAME}'。我在修改 config.xml 之前停止了 Jenkins 服务。资产文件夹和网站图标都在构建中生成。这是 https://github.com/angular/angular-cli/issues/9230 中提到的解决方案之一。感谢您的帮助@Alberto L. Bonfiglio。