我是新的Jenkins,使用的 是在Tomcat6上部署的jenkins 1.651.3 War 是否可以 从jenkins UI Console本身下载Jenkins作业的输出文件(我的作业生成了一个jar 文件)?
因此,有人可以建议我有什么方法或插件可以使每个Jenkins构建输出文件(例如Jar / War)从Jenkins服务器计算机上下载。
[INFO] [INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ NumberGenerator --- [INFO] Building jar: /opt/cloudhost/jenkinsHome/jobs/TestGiby/workspace/NumberGenerator/target/NumberGenerator-0.0.1-SNAPSHOT.jar [INFO] [INFO] --- maven-install-plugin:2.4:install (default-install) @ NumberGenerator --- [INFO] Installing /opt/cloudhost/jenkinsHome/jobs/TestGiby/workspace/NumberGenerator/target/NumberGenerator-0.0.1-SNAPSHOT.jar to /opt/cloudhost/software/maven/mavenRepo/com/giby/maven/NumberGenerator/0.0.1-SNAPSHOT/NumberGenerator-0.0.1-SNAPSHOT.jar [INFO] Installing /opt/cloudhost/jenkinsHome/jobs/TestGiby/workspace/NumberGenerator/pom.xml to /opt/cloudhost/software/maven/mavenRepo/com/giby/maven/NumberGenerator/0.0.1-SNAPSHOT/NumberGenerator-0.0.1-SNAPSHOT.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.575 s [INFO] Finished at: 2017-02-01T05:00:44+00:00 [INFO] Final Memory: 19M/607M [INFO] ------------------------------------------------------------------------ Finished: SUCCESS
使用Archive the artifacts构建后步骤,它将选择的构件复制到构件文件夹中。
然后,您将能够从构建页面本身下载文件。
对于管道,您需要将其添加到管道脚本本身中。检查 相应的groovy脚本以归档工件,或找到以下示例(这是工作代码)。
post { always { archive "project/embsw/debug/**/*" stash includes: 'project/embsw/debug/project_R0.bin', name: 'debugBuiltArtifacts' } }