5.7 KiB
Contribution guide
Never report security issues on GitHub or other public channels (Gitter/Twitter/etc.), follow the instruction from Jenkins Security to report it on Jenkins Jira
Reporting plugin compatibility issues
See COMPATIBILITY
Why should you contribute
You can contribute in many ways, and whatever you choose we're grateful! Source code contribution is the obvious one but we also need your feedback and if you don't really want to participate in the implementation directly you may still have great ideas about features we need (or should get rid of).
We have our vision for the plugin and we have an experience with maintaining Jenkins instances, but the plugin is not supposed to solve only our problems. Surely we haven't experienced all of them... That's why we want to hear from you.
Please use GitHub issues if you need to report a bug or request changes/improvements. Whenever you report a problem please provide information about:
- Plugin version (Configuration as Code plugin as well any other plugin you suspect your problem to be related to)
- Jenkins version
- Operating system
- Description!
Regarding source code contribution WoW
- Create a GitHub issue for your feature/problem you want to solve
- Implement solution on a branch in your fork
- Make sure to include issue number in commit message, and make the message speak for itself
- Once you're done create a pull request and ask at least one of the maintainers for review
- Remember to title your pull request properly as it is used for release notes
Never push directly to this repository!
Newbie-friendly issues
If you are just starting with contribution to Jenkins, we have identified some newbie-friendly issues related to Configuration-as-Code. Here are some queries you can use to find such issues:
Somebody keeps fixing these issues all the time 😱. If the lists are empty, just ask in our Gitter Channel.
Project meetings
Join our Jenkins Configuration as Code office hours meeting scheduled for every second Wednesday. At these meetings we discuss recent releases and incoming changes, everybody is welcome to present their JCasC-related work and case studies. See the Jenkins Event Calendar for exact times, we also repost links in our Gitter chat.
Archive: meeting minutes and meeting recordings.
Run Locally
Prerequisites: Java, Maven & IntelliJ IDEA
-
Ensure Java 8 is available. There are unresolved issues with Java 10/11 as of October 24, 2018.
/usr/libexec/java_home/Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home- If Java 11 is selected by default, check other available Java version below.
/usr/libexec/java_home --verboseMatching Java Virtual Machines (3): 11.0.1, x86_64: "Java SE 11.0.1" /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home 10.0.2, x86_64: "Java SE 10.0.2" /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home 1.8.0_192, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home- Use the alternate Java 8.
export JAVA_HOME=`/usr/libexec/java_home -v 1.8` echo $JAVA_HOME/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home -
Ensure Maven is included in the PATH environment variable.
export PATH=$PATH:/path/to/apache-maven-x.y.z/binIntelliJ IDEA
-
Open the root directory of this project in IntelliJ IDEA.
-
If you are opening the first time, wait patiently while project dependencies are being downloaded.
-
Click
Runin the menu. SelectEdit Configurationsin the menu item. -
Click
Add New Configuration(+) in the top left of the shown dialog. SelectMaven. -
Under
Parameterstab group,Working directory:is/path/to/configuration-as-code-plugin/plugin. -
Under
Parameterstab group,Command line:ishpi:run. -
Verify that IntelliJ IDEA is not using bundled maven.
- Click
File->Preferences...->Build, Execution, Deployment->Build Tools->Maven. Maven home directory:has/path/to/apache-maven-x.y.zvalue, notBundled (Maven 3).
- Click
-
Open http://localhost:8080/jenkins/configuration-as-code/ to test the plugin locally.
CLI
- Go into the
pluginchild directory under the root directory of this project. - Use the below commands.
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
export PATH=$PATH:/path/to/apache-maven-x.y.z/bin
mvn hpi:run
...
INFO: Jenkins is fully up and running
- Open http://localhost:8080/jenkins/configuration-as-code/ to test the plugin locally.