Git Product home page Git Product logo

cloudfoundry-jenkins's Introduction

Cloud Foundry Jenkins plugin

This plugin can push apps to a Cloud Foundry platform at the end of a Jenkins build. You can either use the configuration of a manifest.yml file, or write your settings in the Jenkins build's configuration page.

For usage information and changelog, see the Jenkins Wiki page.

For reporting an issue, please use the Jenkins issue tracker.

Installing:

Due to conflicts between the versions of Spring used by Jenkins and the CF Java client, this plugin uses a modified version of the CF Java client with shaded libraries.

In order to avoid the use of a mvn install-file command on every new machine, this git repository contains a local Maven repository in the lib subfolder, with the shaded library already installed. This allows building the plugin in a single mvn install command.

The command that was used to install the library to the local Maven repository is (from the root of the project):

mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file \
-Dfile=cloudfoundry-client-lib-shaded-1.1.3.jar \
-DlocalRepositoryPath=lib

You do not need to use this command since it has already been done, and the shaded jar is now in the lib folder.

Debugging:

This will launch a Jenkins instance for you with the plugin pre-installed. The Jenkins files will be stored in the work folder. The Jenkins instance will be accessible at http://localhost:8090/jenkins.

mvn hpi:run -Djetty.port=8090

You can also enable remote debugging at port 8000 by setting some Maven options before running the previous command:

export MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n"

Packaging:

If you already have a working Jenkins instance, use this command to create an .hpi file. You can then upload it to your Jenkins instance.

mvn clean install

By default, the integration tests are skipped. If you have a working Cloud Foundry platform and want to run the tests before building, you will need to specify some arguments in your Maven command:

mvn test -Dtarget=<target URL> -Dusername=<username> -Dpassword=<password> -Dorg=<org> -Dspace=<space>

The tests will remove all existing applications and services in that space.

Releasing:

You must not have any unstaged changes.

After adding your jenkins-ci.org username and password in ~/.m2/settings.xml, do:

mvn org.apache.maven.plugins:maven-release-plugin:2.5:prepare org.apache.maven.plugins:maven-release-plugin:2.5:perform

The full artifact name and version is needed to avoid a bug.

Enter the release version, the release tag (default should be good) and the new version name (which can be changed later, but must end with SNAPSHOT).

If at any point you have to start over, use mvn release:clean beforehand. You'll probably also need to delete the new tag locally (and maybe on the remote) and reset to the latest commit.

The new version should appear on this page immediately, otherwise it means the release failed. If it worked, the new version will be available on Jenkins after ~12h. You will see the new version on this page once it is available to download.

cloudfoundry-jenkins's People

Contributors

wgautier avatar buchen avatar jsloyer avatar d036263 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.