From 6821dedda58c3c2865b8eb6e21f31fb37b33e427 Mon Sep 17 00:00:00 2001 From: tesobe-daniel Date: Fri, 24 Nov 2023 17:17:11 +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 7f53aa3ab779f27187dc81ffb58cec7de8f7aeeb Mon Sep 17 00:00:00 2001 From: tesobe-daniel Date: Fri, 24 Nov 2023 20:03:25 +0100 Subject: [PATCH 2/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 2a7d4e6b..8ba59c1b 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-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 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.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:v100.0.5-OC docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags echo docker done From b534b4363b132f1e67a1a9af0ac4241a7d1c9629 Mon Sep 17 00:00:00 2001 From: tesobe-daniel Date: Sun, 26 Nov 2023 19:50:31 +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 8ba59c1b..dc87cefd 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-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.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:v100.0.5-OC + 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 --tag docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:v100.0.5-OC docker push docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }} --all-tags echo docker done