将Jenkins CI部署到Heroku

时间:2014-09-07 21:58:00

标签: java heroku jenkins

有没有办法将Jenkins CI作为Heroku应用运行?

可以运行Java Apps on heroku,但我无法找到如何让Jenkins在Heroku上运行的说明。

非常感谢提示。

1 个答案:

答案 0 :(得分:0)

很容易将Jenkins加载为heroku应用程序

1)pom.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Just need a plain and mostly empty pom.xml for Orchard to detect that this is a Java application
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <version>1.0-SNAPSHOT</version>
    <artifactId>helloworld</artifactId>
</project>
  1. 一个如下所示的Procfile:
  2. 只听http;禁用ajp和https

    web:java -jar jenkins.war --httpPort = $ PORT --ajp13Port = -1 --httpsPort = -1

    1. jenkins.war文件。
    2. 真正的问题是jenkins使用本地文件系统进行存储,并且本地存储在Heroku环境中不是持久的,因此您必须定期管理配置或使用github存储加载项。