Skip to content

Commit

Permalink
feat: Update GitHub actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Dec 8, 2024
1 parent 093207b commit 8269bc3
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 24 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
40 changes: 29 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -203,20 +218,22 @@ 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:
# 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
- 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: |
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
6 changes: 3 additions & 3 deletions docker/alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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}
Expand All @@ -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/* && \
Expand Down
6 changes: 3 additions & 3 deletions docker/multiarch.Dockerfile → docker/focal.Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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}
Expand All @@ -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/* && \
Expand Down
2 changes: 1 addition & 1 deletion docker/proxy.Dockerfile
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 8269bc3

Please sign in to comment.