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

wip use exploded jar #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ jobs:
name: build-artifacts
path: 'build'

- run: java -Djarmode=tools -jar build/libs/glvd-0.0.1-SNAPSHOT.jar extract

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: extracted-jar
path: 'glvd-0.0.1-SNAPSHOT'

container-image:
runs-on: ubuntu-24.04
needs:
Expand All @@ -67,8 +75,8 @@ jobs:
- name: Download built jar
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: build
name: extracted-jar
path: 'glvd-0.0.1-SNAPSHOT'

- name: Install qemu dependency for multi-arch build
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ out/

### Unbase OCI ###
*.oci

glvd-*-SNAPSHOT
11 changes: 5 additions & 6 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ RUN apt-get update -q && apt-get install -y binutils
RUN mkdir /usr/src/glvd
COPY . /usr/src/glvd
WORKDIR /usr/src/glvd
COPY build/libs/glvd-0.0.1-SNAPSHOT.jar glvd-0.0.1-SNAPSHOT.jar
RUN jar xf glvd-0.0.1-SNAPSHOT.jar
COPY glvd-0.0.1-SNAPSHOT .
RUN jdeps --ignore-missing-deps -q \
--recursive \
--multi-release 21 \
--print-module-deps \
--class-path 'BOOT-INF/lib/*' \
glvd-0.0.1-SNAPSHOT.jar > deps.info
--class-path 'glvd-0.0.1-SNAPSHOT/lib/*' \
glvd-0.0.1-SNAPSHOT/glvd-0.0.1-SNAPSHOT.jar > deps.info
RUN jlink \
--add-modules $(cat deps.info) \
--strip-debug \
Expand All @@ -23,6 +22,6 @@ FROM ghcr.io/gardenlinux/gardenlinux:1592
EXPOSE 8080

COPY --from=build /tinysapmachine /jre
COPY --from=build /usr/src/glvd/glvd-0.0.1-SNAPSHOT.jar /
COPY --from=build /usr/src/glvd/glvd-0.0.1-SNAPSHOT /

CMD ["/jre/bin/java", "-jar", "/glvd-0.0.1-SNAPSHOT.jar"]
CMD ["/jre/bin/java", "-jar", "/glvd-0.0.1-SNAPSHOT/glvd-0.0.1-SNAPSHOT.jar"]
Loading