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
Templating forward port for github codespace #1505
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1505 +/- ##
============================================
Coverage 100.00% 100.00%
+ Complexity 1612 1609 -3
============================================
Files 319 331 +12
Lines 5354 5468 +114
Branches 107 110 +3
============================================
+ Hits 5354 5468 +114
Continue to review full report at Codecov.
|
@@ -21,7 +21,8 @@ public void init(Project project) { | |||
} | |||
|
|||
private void addConfig(Project project) { | |||
projectRepository.add(project, SOURCE, "devcontainer.json", DEVCONTAINER_DEST, "devcontainer.json"); | |||
project.addConfig("serverPort", 7471); |
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.
the default port of all Spring Boot application is 8080
7471 is only related to JHipster Lite
@@ -23,7 +23,7 @@ | |||
"christian-kohler.npm-intellisense" | |||
], | |||
|
|||
"forwardPorts": [3001, 4200, 8080, 9000, 18080], | |||
"forwardPorts": {{serverPort}}, |
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.
you need to keep 9000 too, as 9000 is used when you launch the front with npm start
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.
This file needs to be renamed with mustache template too
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.
@matthieulapatate : your initial change was good, we should only have here: {{serverPort}} and 9000
3001, 4200, 18080 need to be removed
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.
Waiting your fix after my review
@@ -23,7 +23,7 @@ | |||
"christian-kohler.npm-intellisense" | |||
], | |||
|
|||
"forwardPorts": [3001, 4200, 8080, 9000, 18080], | |||
"forwardPorts": {{serverPort}}, |
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.
This file needs to be renamed with mustache template too
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.
the Dockerfile doesn't contain any variable, so no need to be mustache
Only devcontainers.json has variable, so this one need to be mustache
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.
plz, squash all your commits at the end too
src/main/resources/generator/setup/codespaces/devcontainer.json.mustache
Outdated
Show resolved
Hide resolved
8b290d3
to
0e21eae
Compare
Still fail. You need to launch local unit tests each time you modify code, it's faster than pushing and waiting the result from CI |
I convert it to draft so:
|
ab77147
to
5e112ff
Compare
I replaced the forward port file with mustache extension to allow import port when importing the file.