-
Notifications
You must be signed in to change notification settings - Fork 44
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
Code Cleanup, Submodule Replacement, Error Handling Improvements & Deployment Enhancements #555
Changes from all commits
0a994a8
1fcb7a5
d5a7353
19adfb4
ffd6066
b4e6ee0
041d22d
ce5e57d
b2209b8
02cbb8e
16e2129
c834498
d5f2916
92b00cd
d25b957
471d98a
87c8ff0
2940ea6
7f60880
09c2fd3
5c102cd
3e957b5
ff5bc02
febaa8e
54f8a7e
5ee2239
88251dd
3d4f103
6917a0f
d26a23e
531172b
76c99dd
92e7aec
12097fe
9fc1a30
74f3b2e
1a10412
240b1f0
82f27a8
2373765
ab87864
e712156
f643e45
efa2385
9647040
39beed6
75b469c
f550a69
f2d1da6
30658df
00be9ef
aa218c6
fbfa3e8
883fa1d
2de9b6a
95a9037
762a714
da7107b
d3cc678
3037e8e
7eb3c3d
f9b5bde
b1728dd
2917a57
d19a562
384911c
e458147
3b0329b
a2c30c6
0f66b7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish Java Package | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'jpo-ode-*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '21' | ||
distribution: 'adopt' | ||
|
||
- name: Remove snapshot from version | ||
run: mvn versions:set -DremoveSnapshot | ||
|
||
- name: Build with Maven | ||
run: mvn -B clean package --file pom.xml -DskipTests -Ppackage-jar | ||
|
||
- name: Publish to GitHub Packages | ||
run: mvn --batch-mode -Dgithub_organization=${{ github.repository_owner }} deploy -DskipTests -Ppackage-jar | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,6 @@ | |
[submodule "jpo-cvdp"] | ||
path = jpo-cvdp | ||
url = https://github.com/usdot-jpo-ode/jpo-cvdp.git | ||
[submodule "jpo-s3-deposit"] | ||
path = jpo-s3-deposit | ||
url = https://github.com/usdot-jpo-ode/jpo-s3-deposit.git | ||
branch = master | ||
[submodule "jpo-security-svcs"] | ||
path = jpo-security-svcs | ||
url = https://github.com/usdot-jpo-ode/jpo-security-svcs.git | ||
|
@@ -17,3 +13,6 @@ | |
[submodule "qa/test-harness/ode-output-validator-library"] | ||
path = qa/test-harness/ode-output-validator-library | ||
url = https://github.com/usdot-jpo-ode/ode-output-validator-library.git | ||
[submodule "jpo-utils"] | ||
path = jpo-utils | ||
url = https://github.com/usdot-jpo-ode/jpo-utils.git | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @SaikrishnaBairamoni Do we need to add github actions to scan this new repo? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dan-du-car we did not setup GitHub actions for jpo-utils repo seems like this is new, I can create a story for this in our backlog. Thanks! |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,6 @@ sonar.modules= asn1_codec, \ | |
jpo-ode-core, \ | ||
jpo-ode-plugins, \ | ||
jpo-ode-svcs, \ | ||
jpo-s3-deposit, \ | ||
jpo-sdw-depositor, \ | ||
jpo-security-svcs | ||
|
||
|
@@ -17,7 +16,6 @@ jpo-ode-consumer-example.sonar.projectBaseDir = /home/circleci/project/jpo-ode | |
jpo-ode-core.sonar.projectBaseDir = /home/circleci/project/jpo-ode-core | ||
jpo-ode-plugins.sonar.projectBaseDir = /home/circleci/project/jpo-ode-plugins | ||
jpo-ode-svcs.sonar.projectBaseDir = /home/circleci/project/jpo-ode-svcs | ||
jpo-s3-deposit.sonar.projectBaseDir = /home/circleci/project/jpo-s3-deposit | ||
jpo-sdw-depositor.sonar.projectBaseDir = /home/circleci/project/jpo-sdw-depositor | ||
jpo-security-svcs.sonar.projectBaseDir = /home/circleci/project/jpo-security-svcs | ||
|
||
|
@@ -28,7 +26,6 @@ jpo-ode-consumer-example.sonar.sources = src | |
jpo-ode-core.sonar.sources = src | ||
jpo-ode-plugins.sonar.sources = src | ||
jpo-ode-svcs.sonar.sources = src | ||
jpo-s3-deposit.sonar.sources = src | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are replacing the s3 depositor with jpo-utils, is it possible to add jpo-util to this scanner? @SaikrishnaBairamoni There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we can update the sonar properties as this PR changes are from CDOT fork I cannot make changes to this |
||
jpo-sdw-depositor.sonar.sources = src | ||
jpo-security-svcs.sonar.sources = src | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,38 @@ | ||
default: | ||
$(info Make target options:) | ||
$(info `make start` to build and run the ODE) | ||
$(info `make start` to run the ODE) | ||
$(info `make build` to build the ODE) | ||
$(info `make stop` to stop the ODE) | ||
$(info `make delete` to destroy the current Docker containers) | ||
$(info `make delete` to stop the ODE and remove the volumes) | ||
$(info `make rebuild` to stop, delete, and then rebuild the containers) | ||
$(info `make clean-build` to rebuild the containers without using the cache) | ||
|
||
start: | ||
ifeq ("$(wildcard ./jpo-ode-private)", "") | ||
$(error "ERROR: Directory `jpo-ode-private` not found in ${PWD}") | ||
endif | ||
ifeq ("$(wildcard ./asn1_codec/asn1c_combined/J2735_201603DA.ASN)", "") | ||
cp ./jpo-ode-private/j2735/J2735_201603DA.ASN ./asn1_codec/asn1c_combined/J2735_201603DA.ASN | ||
endif | ||
ifndef DOCKER_HOST_IP | ||
$(error ERROR: Environment variable DOCKER_HOST_IP is not set) | ||
ifeq ("$(wildcard .env)", "") | ||
$(error "ERROR: jpo-ode Environment file `.env` not found in ${PWD}") | ||
endif | ||
ifndef DOCKER_SHARED_VOLUME | ||
$(error ERROR: Environment variable DOCKER_SHARED_VOLUME is not set) | ||
ifeq ("$(wildcard ./jpo-utils/.env)", "") | ||
$(error "ERROR: jpo-utils Environment file `.env` not found in ${PWD}") | ||
endif | ||
docker compose up -d | ||
|
||
build: | ||
ifeq ("$(wildcard .env)", "") | ||
$(warning "WARNING: Environment file `.env` not found in ${PWD}") | ||
$(error "ERROR: jpo-ode Environment file `.env` not found in ${PWD}") | ||
endif | ||
ifeq ("$(wildcard ./jpo-utils/.env)", "") | ||
$(error "ERROR: jpo-utils Environment file `.env` not found in ${PWD}") | ||
endif | ||
docker-compose up --build -d | ||
docker compose build | ||
|
||
stop: | ||
docker-compose down | ||
docker compose down | ||
|
||
delete: | ||
docker-compose rm -fvs | ||
docker compose down -v | ||
|
||
rebuild: | ||
$(MAKE) stop delete start | ||
$(MAKE) stop delete build start | ||
|
||
clean-build: | ||
docker compose build --no-cache |
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 will be the approx. artifact size and where we are using this ? As our ODE GitHub org is on free plan we have artifact storage limit of 500mb.
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.
Approx:
jpo-ode-common.jar - 38 KB
jpo-ode-core.jar - 154 KB
jpo-ode-plugins.jar - 436 KB
jpo-ode-svcs.jar - 134 MB (large because it includes the Spring web stuff. We could probably make it much smaller by only releasing the normal jar instead of the Spring Boot uberjar)
I'm not certain, but this seems to be saying that the storage limits for maven packages don't apply to public repos:
https://docs.github.com/en/billing/managing-billing-for-github-packages/about-billing-for-github-packages
I am fairly certain that there is no time limit on Maven packages (which are not the same as Gitub Action build artifacts)
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 checked, and the normal jar for jpo-ode-svcs is approx 219KB, so if we changed the action to publish that, the total space would be less than 1MB for everything
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.
@iyourshaw Got it, I'm good with this change. This storage limits are applied for only private repositories. Thanks!
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.
@SaikrishnaBairamoni Here is the relevant PR that addresses this issue. We will work on getting this update merged ASAP.