Code Monkey home page Code Monkey logo

xlrelease-plugin's Introduction

Requirements

This plugin requires XL Release version 4.5+. For older versions of XL Release please use version 4.0.11 of this plugin.

Build

The Jenkins plugin build is powered by the gradle-jpi-plugin (see its documentation).

There are following targets defined:

Builds .hpi file

./gradlew jpi

Run development server:

./gradlew server

Debugging

Debugging is configured with GRADLE_OPTIONS env variable.

GRADLE_OPTS="${GRADLE_OPTS} -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000" ./gradlew clean server

Testing

Additionally to unit tests there are integration tests which you can run by following command:

./gradlew clean itest

Integration tests require that you have a running XL Release server at http://localhost:5516 with standard credentials. You can override the location and credentials using Gradle properties (gradle.properties file or command-line):

xlReleaseIntegration.host=https://my.xl-release/xl-release-context
xlReleaseIntegration.username=user
xlReleaseIntegration.password=password

NOTE: if you change one or more of those parameters it is mandatory to clean before running the tests again.

Development and Gradle

There are several caveats which might be useful when updating Jenkins core version or jpi plugin version.

jenkins-module vs jm

There are some dependencies coming inserted by jpi plugin which fail to be resolved. Seems like some artifacts used to have jenkins-module packaging and it was replaced by jm. You will see an error like this:

Could not resolve all dependencies for configuration ':testCompile'.
> Could not find instance-identity.jenkins-module (org.jenkins-ci.modules:instance-identity:1.3).
  Searched in the following locations:
      http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/modules/instance-identity/1.3/instance-identity-1.3.jenkins-module

To workaround this you need to add proper dependency and exclude the missing one:

dependencies {
    testCompile "org.jenkins-ci.modules:instance-identity:1.3@jm"
}
configurations {
    all*.exclude group: 'org.jenkins-ci.modules', module: 'instance-identity'
}

You might have to do this for several dependencies.

Class not found when running itest

For some reason not all dependencies get inherited by Gradle configuration itestCompile from testCompile. You will see an error like this in your itest results:

java.lang.NoClassDefFoundError: hudson/tasks/Mailer

To fix this you need to add all missing dependencies manually. You can find them using following commands for example:

./gradlew dependencies --configuration testCompile > t.txt
./gradlew dependencies --configuration itestCompile > i.txt
diff t.txt i.txt

Then add them to dependencies:

dependencies {
    itestCompile "org.jenkins-ci.plugins:ant:1.1@jar"
    ...
}

Releasing

See the article on XebiaLabs wiki.

Notes

As doCheck and doAutoComplete not work seamlessly, We gave a validate button for version 6.0.0 of plugin. For more information see Jenkins Bug JENKINS-37204

xlrelease-plugin's People

Contributors

ashish-thakur07 avatar bdevic avatar byaminov avatar favnc avatar jdewinne avatar kzhangxl avatar mathieubigorne avatar mehrat avatar nitheshrayuduv avatar sandeep-rawat-xebia avatar saraswat2385 avatar t-j-f avatar tkhardekar avatar udisch avatar wlee1668 avatar xebialabsci avatar yogeshghotekar avatar ysachin09 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xlrelease-plugin's Issues

Requesting Plugin Compatibility with 'Jenkins Configuration as Code'

io.jenkins.plugins.casc.ConfiguratorException: Invalid configuration elements for type class com.xebialabs.xlrelease.ci.XLReleaseNotifier$XLReleaseDescriptor : xlReleaseServerUrl,credential.
Available attributes :
at io.jenkins.plugins.casc.BaseConfigurator.handleUnknown(BaseConfigurator.java:374)
at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:363)
at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:284)
at io.jenkins.plugins.casc.BaseConfigurator.configure(BaseConfigurator.java:349)
at io.jenkins.plugins.casc.BaseConfigurator.check(BaseConfigurator.java:284)
at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$checkWith$8(ConfigurationAsC

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.