Skip to content

Commit

Permalink
Run completebuild in docker too
Browse files Browse the repository at this point in the history
  • Loading branch information
Kale-Ko committed Jun 5, 2024
1 parent 43dfa58 commit 16ffb9e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ jobs:
--build-arg "TARGET_GCC_PACKAGE=${{ matrix.architecture.gcc_package_name }}" \
--build-arg "TARGET_GCC_EXEC=${{ matrix.architecture.gcc_exec_name }}" \
--tag linux-buildimage:${{ matrix.architecture.name }} \
docker/
docker/build/
- name: Build
run: |
chmod +x ./mvnw ./mvnw.cmd
export MAVEN_HOME=$(dirname $(dirname $(which mvn)))
docker run \
Expand Down Expand Up @@ -210,6 +212,15 @@ jobs:
architecture: 'x64'
check-latest: true

- name: Setup Docker
run: |
docker build \
--platform linux/amd64 \
--build-arg "UBUNTU_VERSION=18.04" \
--build-arg "JAVA_VERSION=${{ matrix.java_version }}" \
--tag linux-buildimage:complete \
docker/completebuild/
- name: Download builds
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -237,7 +248,16 @@ jobs:
- name: Build
run: |
chmod +x ./mvnw ./mvnw.cmd
./mvnw -B -V -ntp -P "release" "-Dmaven.test.skip=true" package
export MAVEN_HOME=$(dirname $(dirname $(which mvn)))
docker run \
--platform linux/amd64 \
--volume "$PWD:/data" \
--volume "$JAVA_HOME:/opt/java" \
--volume "$MAVEN_HOME:/opt/maven" \
linux-buildimage:complete \
./mvnw -B -V -ntp -P "release" "-Dmaven.test.skip=true" package
- name: Upload build
uses: actions/upload-artifact@v4
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions docker/completebuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
ARG UBUNTU_VERSION
FROM ubuntu:${UBUNTU_VERSION}
USER root

VOLUME "/opt/java"
ENV JAVA_HOME="/opt/java"
ENV PATH="$JAVA_HOME:$PATH"

VOLUME "/opt/maven"
ENV MAVEN_HOME="/opt/maven"
ENV PATH="$MAVEN_HOME:$PATH"

VOLUME "/data"
WORKDIR "/data"

ENTRYPOINT [ ]
CMD [ "/bin/bash" ]

0 comments on commit 16ffb9e

Please sign in to comment.