我正在评估 AWS 的新 CodePipeline 服务。基本思想如下:从存储库(在我的例子中 - GitHub)下载新代码,针对 Jenkins 实例运行它,然后将其部署到 Elastic Beanstalk(如果构建成功)。我已经为 Jenkins 配置了 CodePipeline 插件,完全按照此处的说明进行操作。我还设置了一个包含以下阶段的 3 阶段管道:源(从 GitHub 下载代码)-> 构建(与 Jenkins 链接,在某些 EC2 实例上运行)-> Beta(部署成功构建的应用程序)。通过 Source 阶段后,Jenkins 开始构建项目。控制台输出如下所示
Started by user Svetlin Slavov
Building in workspace /var/lib/jenkins/jobs/DemoOne/workspace
[workspace] $ /usr/share/maven/bin/mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building testApp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ test_app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ test_app ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.3:testResources (default-testResources) @ test_app ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/lib/jenkins/jobs/DemoOne/workspace/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ test_app ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ test_app ---
[INFO] Surefire report directory: /var/lib/jenkins/jobs/DemoOne/workspace/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.ontotext.s4.test_application.PipelineAppTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.3 sec
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ test_app ---
[INFO] Packaging webapp
[INFO] Assembling webapp [test_app] in [/var/lib/jenkins/jobs/DemoOne/workspace/target/ExamplePipe]
[INFO] Processing war project
[INFO] Copying webapp resources [/var/lib/jenkins/jobs/DemoOne/workspace/src/main/webapp]
[INFO] Webapp assembled in [102 msecs]
[INFO] Building war: /var/lib/jenkins/jobs/DemoOne/workspace/target/ExamplePipe.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] --- maven-install-plugin:2.3:install (default-install) @ test_app ---
[INFO] Installing /var/lib/jenkins/jobs/DemoOne/workspace/target/ExamplePipe.war to /var/lib/jenkins/.m2/repository/com/ontotext/s4/test_app/0.0.1-SNAPSHOT/test_app-0.0.1-SNAPSHOT.war
[INFO] Installing /var/lib/jenkins/jobs/DemoOne/workspace/pom.xml to /var/lib/jenkins/.m2/repository/com/ontotext/s4/test_app/0.0.1-SNAPSHOT/test_app-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.333s
[INFO] Finished at: Mon Jan 04 13:12:15 UTC 2016
[INFO] Final Memory: 9M/22M
[INFO] ------------------------------------------------------------------------
Finished: SUCCESS
但是在内部版本号页面上,它显示“无法确定(日志)”log
链接到上述输出的位置。这会导致 CodePipeline 在构建阶段冻结,加载箭头在旋转。是否有我必须安装的插件,以便 Jenkins 将构建标记为成功,或者这是一个 Jenkins 错误/问题要解决?