简体   繁体   English

将Jenkins CI部署到Heroku

[英]Deploy Jenkins CI to Heroku

Is there a way to run Jenkins CI as an Heroku app? 有没有办法运行Jenkins CI作为Heroku应用程序?

It is possible to run Java Apps on heroku but I cannot find description of how to make Jenkins run on Heroku anywhere. 可以在heroku上运行Java应用程序,但我找不到如何让Jenkins在Heroku上运行的描述。

Very grateful for hints. 非常感谢提示。

Easy enough to load Jenkins as a heroku app 很容易加载Jenkins作为一个heroku应用程序

1) pom.xml file: 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. A Procfile that looks like this: 一个如下所示的Procfile:

Only listen on http; 只听http; disable ajp and https 禁用ajp和https

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

  1. The jenkins.war file. jenkins.war文件。

The real problem becomes that jenkins uses the local filesystem for storage and the local storage is not persistent in the Heroku environment so you have to manage your configuration regularly or using the github storage add-on. 真正的问题是jenkins使用本地文件系统进行存储,并且本地存储在Heroku环境中不是持久的,因此您必须定期管理配置或使用github存储加载项。

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

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