Developer Guide
This guide will help you set up your environment for development of Jenkins Plugins for codeBeamer.
Environment
What you need:
- Java SDK and Maven installed on the PC
- codeBeamer instance to test against
- IDE of your choice for debugging
codeBeamer:
The quickest way to setup codeBeamer is to use the Docker Container. This container also includes some demo test cases and a preconfigured Jenkins (which we won't use but we can copy the configuration from it).
docker run -d -p 8888:80 -p 9000:8080 -p 222:22 intland/codebeamer-jenkins
Username/Password are bond/007.
IDE:
Here, IntelliJ Idea is used but debugging should also work with Eclipse.
First, we use Maven to start Jenkins with our Plugin installed from the command line:
codebeamer-xunit-importer-plugin$ MAVEN_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n" mvn hpi:run -Djetty.port=8090
This command will start a Jetty Server listening on Port 8090. Navigate your Browser to http://localhost:8090/jenkins/ and add a new Freestlye Project and copy the settings from the Java Example of the Jenkins instance provided by the Docker Container.
Now, we need to configure a Debug Configuration in IntelliJ Idea:
Important: set the port to the same value as the address in MAVEN_OPTS
Now you can set BreakPoints in the Code in IntelliJ Idea and debug the plugin.