简体   繁体   English

在 Jenkins Artifacts 中仅存档 aspx 页面

[英]Archiving only aspx pages in Jenkins Artifacts

I have a Jenkins installation, wherein post successful build i archive the artifacts, so that in the Post build action, i can deploy the artifacts to my production website.我有一个 Jenkins 安装,其中在成功构建后我存档了工件,因此在构建后操作中,我可以将工件部署到我的生产网站。 However i do not find any option to only archive the aspx pages, like mostly we get when we publish the website.但是我没有找到任何只存档 aspx 页面的选项,就像我们发布网站时得到的大多数一样。

However i see a File Pattern field in the Archive Artifacts plugin, however i am not sure, what pattern i can use so that Jenkins would provide me a published copy of the build (artifacts).但是,我在 Archive Artifacts 插件中看到一个文件模式字段,但我不确定我可以使用什么模式,以便 Jenkins 为我提供构建(工件)的已发布副本。

Could anyone please provide me file patterns i can use to get the Published copy, or is there any other way i can get the published copy to release on production in Jenkins任何人都可以提供我可以用来获取已发布副本的文件模式,或者有没有其他方法可以让我获取已发布副本以在 Jenkins 中发布生产

In a pipeline job you can use this:在管道作业中,您可以使用它:

stage('archive') {
    logFiles = findFiles(glob: '**/*.aspx')
    if (logFiles.length > 0){
        archiveArtifacts artifacts: '**/*.aspx', fingerprint: true
    } else {
        print ('no artifacts to archive')
    }
}

If you are not using a pipeline job, you probably can use the Ant pattern **/*.aspx on the job configuration如果您没有使用管道作业,您可能可以在作业配置中使用 Ant 模式 **/*.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM