diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index af5cbcf..8d136b3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,4 +45,55 @@ jobs: jee-agents-distribution/jee-agents-distribution-jetty-v61/target/*.zip jee-agents-distribution/jee-agents-distribution-jetty-v7/target/*.zip jee-agents-distribution/jee-agents-distribution-jsr196/target/*.zip - jee-agents-distribution/jee-agents-distribution-tomcat-v6/target/*.zip \ No newline at end of file + jee-agents-distribution/jee-agents-distribution-tomcat-v6/target/*.zip + build-docker-tomcat85-jre8: + runs-on: 'ubuntu-latest' + services: + registry: + image: registry:2 + ports: + - 5000:5000 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + submodules: recursive + - name: Get latest release version + shell: bash + run: | + git fetch -t; export git_version_last="$(git describe --abbrev=0 --tags)" ; echo "last release: $git_version_last" + echo "release_version=$git_version_last" >> $GITHUB_ENV + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + localhost:5000/${{ github.repository }} + tags: | + type=raw,value=latest + type=raw,value=${{ env.release_version }} + type=raw,value=${{ env.release_version }}-tomcat + type=raw,value=tomcat + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + with: + driver-opts: network=host + - name: Build image + uses: docker/build-push-action@v3 + continue-on-error: true + with: + context: ./jee-agents-distribution/jee-agents-distribution-tomcat-v6 + file: ./jee-agents-distribution/jee-agents-distribution-tomcat-v6/Dockerfile + build-args: | + VERSION=${{ env.release_version }} + platforms: linux/386, linux/amd64, linux/arm64/8, linux/arm/v6, linux/arm/v7, linux/ppc64le, linux/s390x + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + - name: Docker test + shell: bash + run: | + docker run --rm -it -d --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }} + timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\"; do sleep 10; done' \ No newline at end of file diff --git a/jee-agents-distribution/jee-agents-distribution-tomcat-v6/Dockerfile b/jee-agents-distribution/jee-agents-distribution-tomcat-v6/Dockerfile index 437225f..be3881d 100644 --- a/jee-agents-distribution/jee-agents-distribution-tomcat-v6/Dockerfile +++ b/jee-agents-distribution/jee-agents-distribution-tomcat-v6/Dockerfile @@ -1,4 +1,4 @@ -FROM tomcat:8.5-jre8 +FROM tomcat:8.5-jre8-alpine MAINTAINER Open Identity Platform Community