-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated Run Locally IntelliJ IDEA section in CONTRIBUTING.md guide #2191
Conversation
…e a new one everytime we clone the repo
Codecov Report
@@ Coverage Diff @@
## master #2191 +/- ##
=========================================
Coverage 80.96% 80.96%
Complexity 843 843
=========================================
Files 72 72
Lines 2506 2506
Branches 352 352
=========================================
Hits 2029 2029
Misses 365 365
Partials 112 112 |
@@ -1,48 +0,0 @@ | |||
<component name="ProjectRunConfigurationManager"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reason to delete this? I would've thought it just needed the jenkins.version updating to one that supports Java 17 everything else should just work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the steps of the guide make us create a new Run configuration when we open on IntelliJ, why would we save this particular one ? Unless it is necessary to have it for some remote testing or to run the project on the cli, I don't think it does anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added the .run/
directory to .gitignore
for the same reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when you open intellij you should get this working run configuration and not have to do anything.
i.e. you should be able to start developing immediately without having to follow a guide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That wasn't the case for me. Here are the steps I took:
- Cloned the project from my fork
- Opened it on IntelliJ
- Ran the project with the existing
start jenkins.run.xml
run configuration. Outputs a stack of exceptions and doesn't run. - The
docs/CONTRIBUTING.md
suggests that we have to create a new run configuration. which I did but it still didn't run. - I had to modify the Java Options properties and change the value of
jenkins.version
to the one I had installed. - After that the project ran properly.
- The guide tells us to open http://localhost:8080/jenkins/configuration-as-code to test the plugin locally
- Since I had Jenkins already running on port 8080 I had to map it to port 8085
I hope this helps clarify the difficulties I had running the project and the reason for this PR.
The process of running the project locally was complicated and confusing for me (as a beginner). This is my first attempt to make it more straightforward.
The most significant change is that in the creation of a new run configuration we need to add Java Options properties to specify values for
java.awt.headless
,jenkins.version
andport
.port
needs to be set to8085
if the local Jenkins installation is mapped to port 8080 or else you will have a "port already in use" message.Jenkins.version
needs to be set to your local Jenkins installation version.java.awt.headless
needs to be set to trueMoved the Maven Bundle check before the run configurations creation for the sake of clarity. Also changed to port in the link provided in the guide to 8085.
Your checklist for this pull request
🚨 Please review the guidelines for contributing to this repository.