我正在评估AWS的新CodePipeline服务。基本思想如下:从存储库(在我的情况下 - GitHub)下载新代码,针对Jenkins实例运行它,然后将其部署到Elastic Beanstalk(如果构建成功)。我已经为Jenkins配置了CodePipeline插件,正好遵循here的说明。我还建立了一个包含以下阶段的3阶段管道:Source(从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错误/问题要解决?
答案 0 :(得分:0)
事实证明,“无法确定”消息是关于Jenkins无法检测到代码更改。这是因为每次管道发生变化时,插件都会提取代码并将其“注入”Jenkins进行测试。
问题仍然存在,所以当(如果有的话)我对CodePipeline被困在BuildStage上的问题更加清晰时,我会在这里发布它,如果将来有用的话。 / p>