From 8269bc37923ff9458f1a2134978a83fa37e376cd Mon Sep 17 00:00:00 2001 From: EdwinBetanc0urt Date: Sun, 8 Dec 2024 15:14:39 -0400 Subject: [PATCH] feat: Update GitHub actions. --- .github/workflows/ci.yml | 10 +++-- .github/workflows/publish.yml | 40 ++++++++++++++----- .vscode/launch.json | 2 +- README.md | 2 +- docker/alpine.Dockerfile | 6 +-- ...{multiarch.Dockerfile => focal.Dockerfile} | 6 +-- docker/proxy.Dockerfile | 2 +- 7 files changed, 44 insertions(+), 24 deletions(-) rename docker/{multiarch.Dockerfile => focal.Dockerfile} (92%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf2260e..bf757bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,17 +22,19 @@ on: - master - develop - experimental + - test/** - bugfix/** - hotfix/** - feature/** paths-ignore: - README.md - README.es.md + - docker/* jobs: build-ci: - name: Build Template + name: Build ADempiere Report Engine runs-on: ubuntu-latest steps: - name: Check out the repo @@ -47,10 +49,10 @@ jobs: architecture: x64 - name: Build with Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/actions/setup-gradle@v3 env: - GITHUB_DEPLOY_USER: "${{ secrets.DEPLOY_USER }}" - GITHUB_DEPLOY_TOKEN: "${{ secrets.DEPLOY_TOKEN }}" + GITHUB_DEPLOY_USER: ${{ secrets.DEPLOY_USER }} + GITHUB_DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }} with: gradle-version: 8.0.2 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 40fd1fe..57b8aa4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ jobs: # Build dist application adempiere-report-engine-service build-app: - name: Build dist Template + name: Build dist ADempiere Report Engine runs-on: ubuntu-latest steps: - name: Check out the repo @@ -29,7 +29,7 @@ jobs: architecture: x64 - name: Build with Gradle - uses: gradle/gradle-build-action@v3 + uses: gradle/actions/setup-gradle@v3 with: gradle-version: 8.0.2 arguments: createRelease @@ -52,6 +52,13 @@ jobs: with: name: adempiere-report-engine-service.dsc path: build/descriptors/adempiere-report-engine-service.dsc + retention-days: 1 + + - name: Upload envoy file artifact + uses: actions/upload-artifact@v4 + with: + name: envoy.yaml + path: resources/envoy.yaml - name: Upload dist app zip artifact uses: actions/upload-artifact@v4 @@ -95,6 +102,13 @@ jobs: with: args: adempiere-report-engine-service.dsc/adempiere-report-engine-service.dsc + - name: Upload Envoy config + uses: skx/github-action-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: envoy.yaml/envoy.yaml + - name: Upload zip uses: skx/github-action-publish-binaries@master env: @@ -172,8 +186,9 @@ jobs: # CONFIGURE DOCKER SECRETS INTO REPOSITORY username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} + - name: Push alpine image in Docker Hub - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . file: docker/alpine.Dockerfile @@ -203,8 +218,10 @@ jobs: unzip adempiere-report-engine-service.zip -d docker/ - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: @@ -212,11 +229,11 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Push alpine image in Docker Hub - uses: docker/build-push-action@v5 + - name: Push image in Docker Hub + uses: docker/build-push-action@v6 with: context: . - file: docker/multiarch.Dockerfile + file: docker/focal.Dockerfile platforms: linux/amd64,linux/amd64/v2,linux/arm64/v8 push: true tags: | @@ -248,9 +265,9 @@ jobs: fi # TODO: Download .tar and add docker image without uncompress - # Publish docker multiplatform image in Docker Hub Registry to application - push-proxy-imame-dhr: - name: Push multiplatform proxy docker image to Docker Hub + # Publish docker image multiplatform in Docker Hub Registry to application + push-grpc-proxy-imame-dhr: + name: Push grpc-proxy docker image to Docker Hub needs: - check-proxy-docker-secrets # Skip step based on secret @@ -268,6 +285,7 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -278,8 +296,8 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - - name: Push alpine image in Docker Hub - uses: docker/build-push-action@v5 + - name: Push image in Docker Hub + uses: docker/build-push-action@v6 with: context: . file: docker/proxy.Dockerfile diff --git a/.vscode/launch.json b/.vscode/launch.json index ad8ee6a..d7f612d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "configurations": [ { "type": "java", - "name": "ADmempiere gRPC Template", + "name": "ADmempiere Report Engine", "request": "launch", "mainClass": "org.spin.report_engine.server.ReportEngineServer", "projectName": "adempiere-report-engine-service", diff --git a/README.md b/README.md index 4211e3b..3710f56 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,8 @@ To use this Docker image you must have your Docker engine version greater than o * `CONNECTION_TEST_QUERY`: It sets how often HikariCP will check if a connection is still working properly. This helps prevent problems with connections that might become inactive. Default: `SELECT 1` * `SERVER_PORT`: Port to access Adempiere-Backend from outside of the container. Default: `50059`. * `SERVER_LOG_LEVEL`: Log Level. Default: `WARNING`. + * `JAVA_OPTIONS`: Custom settings to the Java Virtual Machine (JVM). Default: `-Xms64M -Xmx1512M`. * `TZ`: (Time Zone) Indicates the time zone to set in the nginx-based container, the default value is `America/Caracas` (UTC -4:00). - * `SYSTEM_LOGO_URL`: Logo of the main image of the system, shown in the login screen. You can download the last image from docker hub, just run the follow command: diff --git a/docker/alpine.Dockerfile b/docker/alpine.Dockerfile index a86a27d..6ff44d3 100644 --- a/docker/alpine.Dockerfile +++ b/docker/alpine.Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:11.0.22_7-jdk-alpine +FROM eclipse-temurin:11.0.24_8-jdk-alpine LABEL maintainer="ySenih@erpya.com; EdwinBetanc0urt@outlook.com;" \ description="Backend gRPC" @@ -20,7 +20,7 @@ ENV \ MAXIMUM_LIFETIME="6000" \ KEEPALIVE_TIME="360000" \ CONNECTION_TEST_QUERY="\"SELECT 1\"" \ - SYSTEM_LOGO_URL="" \ + JAVA_OPTIONS="\"-Xms64M\" \"-Xmx1512M\"" \ TZ="America/Caracas" EXPOSE ${SERVER_PORT} @@ -31,7 +31,7 @@ RUN apk update && \ apk add --no-cache \ tzdata \ bash \ - fontconfig \ + fontconfig \ ttf-dejavu && \ rm -rf /var/cache/apk/* && \ rm -rf /tmp/* && \ diff --git a/docker/multiarch.Dockerfile b/docker/focal.Dockerfile similarity index 92% rename from docker/multiarch.Dockerfile rename to docker/focal.Dockerfile index 91f09d6..54717b2 100644 --- a/docker/multiarch.Dockerfile +++ b/docker/focal.Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:11.0.22_7-jdk-focal +FROM eclipse-temurin:11.0.24_8-jdk-focal LABEL maintainer="ySenih@erpya.com; EdwinBetanc0urt@outlook.com;" \ description="Backend gRPC" @@ -20,7 +20,7 @@ ENV \ MAXIMUM_LIFETIME="6000" \ KEEPALIVE_TIME="360000" \ CONNECTION_TEST_QUERY="\"SELECT 1\"" \ - SYSTEM_LOGO_URL="" \ + JAVA_OPTIONS="\"-Xms64M\" \"-Xmx1512M\"" \ TZ="America/Caracas" EXPOSE ${SERVER_PORT} @@ -31,7 +31,7 @@ RUN apt-get update && \ apt-get install -y \ tzdata \ bash \ - fontconfig \ + fontconfig \ ttf-dejavu && \ rm -rf /var/lib/apt/lists/* \ rm -rf /tmp/* && \ diff --git a/docker/proxy.Dockerfile b/docker/proxy.Dockerfile index 9b6029b..38d1d48 100644 --- a/docker/proxy.Dockerfile +++ b/docker/proxy.Dockerfile @@ -1,4 +1,4 @@ -FROM envoyproxy/envoy:v1.29.2 +FROM envoyproxy/envoy:v1.32.0 LABEL maintainer="ySenih@erpya.com; EdwinBetanc0urt@outlook.com;" \ description="Proxy Transcoding gRPC to JSON via http"