From a749460d4194df441c5e57eacffefe5471c09edd Mon Sep 17 00:00:00 2001 From: tesobe-daniel Date: Fri, 24 Nov 2023 17:41:27 +0100 Subject: [PATCH 1/3] Create Dockerfile_PreBuild_OC --- .github/Dockerfile_PreBuild_OC | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/Dockerfile_PreBuild_OC diff --git a/.github/Dockerfile_PreBuild_OC b/.github/Dockerfile_PreBuild_OC new file mode 100644 index 00000000..58922ff2 --- /dev/null +++ b/.github/Dockerfile_PreBuild_OC @@ -0,0 +1,10 @@ +FROM jetty:9.4.49-jre11-alpine + +# Copy OBP source code +# Copy build artifact (.war file) into jetty from 'maven' stage. +COPY /target/API_Explorer-1.0.war /var/lib/jetty/webapps/ROOT.war +USER root +RUN chgrp -R 0 /tmp/jetty && chmod -R g+rwX /tmp/jetty +RUN chgrp -R 0 /var/lib/jetty && chmod -R g+rwX /var/lib/jetty +RUN chgrp -R 0 /usr/local/jetty && chmod -R g+rwX /usr/local/jetty +USER jetty From 53ef9ed80d9c6cc10610abddd4d5a091801cc024 Mon Sep 17 00:00:00 2001 From: tesobe-daniel Date: Fri, 24 Nov 2023 17:44:06 +0100 Subject: [PATCH 2/3] Update build_package.yml --- .github/workflows/build_package.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index 1ffb4e7a..a58a174a 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -26,6 +26,7 @@ jobs: run: | echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io docker build . --file .github/Dockerfile_PreBuild --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:latest --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:develop + docker build . --file .github/Dockerfile_PreBuild_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:latest --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:develop docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags echo docker done From 8424339d2c758239f5df98421f90fae16dda62af Mon Sep 17 00:00:00 2001 From: tesobe-daniel Date: Fri, 24 Nov 2023 17:48:21 +0100 Subject: [PATCH 3/3] Update build_package.yml --- .github/workflows/build_package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index a58a174a..2a7d4e6b 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -26,7 +26,7 @@ jobs: run: | echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io docker build . --file .github/Dockerfile_PreBuild --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:latest --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:develop - docker build . --file .github/Dockerfile_PreBuild_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:latest --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:develop + docker build . --file .github/Dockerfile_PreBuild_OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:$GITHUB_SHA-OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:latest-OC --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:develop-OC docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags echo docker done