Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

ilya2s
Copy link

@ilya2s ilya2s commented Jan 5, 2023

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 and port.

  • port needs to be set to 8085 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.
  • (Optional) java.awt.headless needs to be set to true

Moved 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.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test case? That demonstrates the feature works or fixes the issue.

@ilya2s ilya2s requested a review from a team as a code owner January 5, 2023 10:47
@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Merging #2191 (6ec3b9d) into master (33658dd) will not change coverage.
The diff coverage is n/a.

@@            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">
Copy link
Member

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

Copy link
Author

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

Copy link
Author

@ilya2s ilya2s Jan 5, 2023

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.

Copy link
Member

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

Copy link
Author

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.

@timja timja mentioned this pull request Jan 6, 2023
@timja
Copy link
Member

timja commented Jan 6, 2023

@ilya2s can you try #2192 instead please? I've made some changes to the contributing doc in there

@ilya2s
Copy link
Author

ilya2s commented Jan 7, 2023

@ilya2s can you try #2192 instead please? I've made some changes to the contributing doc in there

#2192 compiles and runs without any manual tweaking. Thank you @timja.

@timja timja closed this Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants