This public repository is read-only and no longer maintained.
The Cloud Jenkins sample project builds a web archive for running Jenkins in a developer account of the SAP HANA Cloud Platform.
There is no persistent file system available in SAP HANA Cloud Platform developer accounts. The Cloud Jenkins overcomes this limitation by storing the configuration in the SAP HANA Cloud Platform document service.
-
Apache Maven 3.0.4 or newer
-
A Maven settings.xml which allows access to the Maven repository of the Jenkins project. To configure this, you can e.g. insert the following configuration into your settings.xml file:
<profiles> <profile> <id>default-repositories</id> <activation> <activeByDefault>true</activeByDefault> </activation> <repositories> <repository> <id>central</id> <url>http://repo.maven.apache.org/maven2/</url> </repository> <repository> <id>repo.jenkins-ci.org</id> <url>http://repo.jenkins-ci.org/public/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://repo.maven.apache.org/maven2/</url> </pluginRepository> <pluginRepository> <id>repo.jenkins-ci.org</id> <url>http://repo.jenkins-ci.org/public/</url> </pluginRepository> </pluginRepositories> </profile> </profiles>
-
Clone the project from Github:
git clone https://github.com/sap/cloud-jenkins.git; cd cloud-jenkins
-
Build the project:
mvn clean install
-
Deploy the web archive to your SAP HANA Cloud Platform developer account:
<path to neo tool> deploy --host hanatrial.ondemand.com --account <your developer account> --application jenkins --uri-encoding UTF-8 --user <your user ID> --source cloud-jenkins-webarchive/target/ROOT.war
The neo tool (
neo.sh
orneo.bat
) is part of the SAP HANA Cloud Platform SDK and located in thetools
folder. If you access the internet via a proxy, see this documentation page: Setting Up the Console Client -
Configure the permissions for the Cloud Jenkins deployment:
- Go to the SAP HANA Cloud Platform cockpit
- On the "Authorizations" tab, enter your user ID and click on "Show Assignments"
- Assign your user to the "admin" role of the "jenkins" application.
-
Start the "jenkins" application on the "Java Applications" tab. The application status page also shows the URL of the application.
As a result, you get:
- A running Jenkins instance with
- A Preconfiguration suitable for running on SAP HANA Cloud Platform (proxy, security, JGit, Maven settings), and
- A plugin installed that adds the "Manage Jenkins Installation on Cloud" configuration page under "Manage Jenkins"
On the "Manage Jenkins Installation on Cloud" configuration page, you can:
- Upload files to Jenkins
- Delete files from Jenkins
- Store the Jenkins configuration in the SAP HANA Cloud Platform document service so that it survives a restart
As next steps, you may want to
- Add a new build job on your Jenkins instance. Don't forget to also store the configuration in the SAP HANA Cloud Platform document service ("Manage Jenkins" > "Manage Jenkins Installation on Cloud") so that the new job is still available after a restart.
- Read the this blog article.
The project consists of the following modules:
- cloud-jenkins-bootstrap: This module contains the bootstrapping logic which restores the Jenkins configuratation from the SAP HANA Cloud Platform document service before Jenkins is started.
- cloud-jenkins-storage: This module contains the logic to store the Jenkins configuration in the SAP HANA Cloud Platform document service.
- cloud-jenkins-defaults: This module contains the configuration which is used on first startup of the Cloud Jenkins.
- cloud-jenkins-plugin: This module contains the Cloud Jenkins plug-in. It provides the "Manage Cloud Jenkins Configuration" user interface.
- cloud-jenkins-webarchive: This module builds the Jenkins web archive that is ready to use in a SAP HANA Cloud Platform developer account.
Copyright 2013, 2014 SAP AG
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
See also the file LICENSE.