Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update GitHub actions. #10

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 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,14 +49,14 @@ jobs:
architecture: x64

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/actions/setup-gradle@v3
env:
GITHUB_DEPLOY_USER: ${{ github.actor }}
GITHUB_DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }}
ORG_GRADLE_PROJECT_deployUsername: ${{ secrets.DEPLOY_USER }}
ORG_GRADLE_PROJECT_deployToken: ${{ secrets.DEPLOY_TOKEN }}
ORG_GRADLE_PROJECT_deplyRepository: ${{ secrets.DEPLOY_REPOSITORY }}
GITHUB_DEPLOY_USER: ${{ github.actor }}
GITHUB_DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }}
with:
gradle-version: 8.0.2
arguments: build
Expand Down
44 changes: 31 additions & 13 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 Down Expand Up @@ -43,18 +43,25 @@ jobs:
gradle-version: 8.0.2
arguments: createRelease
env:
GITHUB_DEPLOY_USER: ${{ github.actor }}
GITHUB_DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }}
ORG_GRADLE_PROJECT_deployUsername: ${{ secrets.DEPLOY_USER }}
ORG_GRADLE_PROJECT_deployToken: ${{ secrets.DEPLOY_TOKEN }}
ORG_GRADLE_PROJECT_deplyRepository: ${{ secrets.DEPLOY_REPOSITORY }}
GITHUB_DEPLOY_USER: ${{ github.actor }}
GITHUB_DEPLOY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }}

- name: Upload descriptor file artifact
uses: actions/upload-artifact@v4
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 @@ -98,6 +105,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 @@ -175,8 +189,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 @@ -206,20 +221,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 @@ -251,9 +268,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 @@ -271,6 +288,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 @@ -281,8 +299,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="[email protected]; [email protected];" \
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="[email protected]; [email protected];" \
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="[email protected]; [email protected];" \
description="Proxy Transcoding gRPC to JSON via http"
Expand Down
Loading