Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Merge pull request #223 from vzwingma/feat/update_versions #27

Merge pull request #223 from vzwingma/feat/update_versions

Merge pull request #223 from vzwingma/feat/update_versions #27

Workflow file for this run

name: CI - native release apps
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for tags
push:
tags:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# BUILD COMMUNS
build-communs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout sources
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
# Update version
- name: Get tag Version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
- name: Apply version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
- name: Commit version
run: mvn versions:commit
# Runs the Build with Maven
- name: Build Communs with Maven
run: mvn clean install -B --file communs/pom.xml
- name: Publish to GitHub Packages Apache Maven
run: mvn --batch-mode deploy -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload DockerFile
- uses: actions/upload-artifact@v3
name: Upload DockerFile
with:
name: Dockerfile.native-micro
path: /home/runner/work/gestion-budget-services/gestion-budget-services/communs/src/main/docker/Dockerfile.native-micro
# BUILD
build-parametrages:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: build-communs
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
# Update version
- name: Get tag Version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
- name: Apply version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
- name: Commit version
run: mvn versions:commit
# Runs a single command using the runners shell
- name: Build Parametrage Native App with Maven
run: mvn install -P native -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 --file parametrages/pom.xml -s settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload Releases
- uses: actions/upload-artifact@v3
name: Upload Service Paramétrages
with:
name: parametrages-runner
path: /home/runner/work/gestion-budget-services/gestion-budget-services/parametrages/target/parametrages-runner
build-utilisateurs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: build-communs
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
components: 'native-image'
# Update version
- name: Get tag Version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
- name: Apply version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
- name: Commit version
run: mvn versions:commit
# Runs a single command using the runners shell
- name: Build Utilisateurs Native App with Maven
run: mvn install -B -P native -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 --file utilisateurs/pom.xml -s settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload Releases
- uses: actions/upload-artifact@v3
name: Upload Service Utilisateurs
with:
name: utilisateurs-runner
path: /home/runner/work/gestion-budget-services/gestion-budget-services/utilisateurs/target/utilisateurs-runner
build-comptes:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: build-communs
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
components: 'native-image'
# Update version
- name: Get tag Version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
- name: Apply version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
- name: Commit version
run: mvn versions:commit
# Runs a single command using the runners shell
- name: Build Comptes Native App with Maven
run: mvn install -B -P native -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 --file comptes/pom.xml -s settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload Releases
- uses: actions/upload-artifact@v3
name: Upload Service Comptes
with:
name: comptes-runner
path: /home/runner/work/gestion-budget-services/gestion-budget-services/comptes/target/comptes-runner
build-operations:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: build-communs
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- uses: graalvm/setup-graalvm@v1
with:
version: 'latest'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}
# Update version
- name: Get tag Version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
- name: Apply version
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
- name: Commit version
run: mvn versions:commit
# Runs a single command using the runners shell
- name: Build Comptes Native App with Maven
run: mvn install -B -P native -Dnative -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17 --file operations/pom.xml -s settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload Releases
- uses: actions/upload-artifact@v3
name: Upload Service Operations
with:
name: operations-runner
path: /home/runner/work/gestion-budget-services/gestion-budget-services/operations/target/operations-runner
# PUBLISH DOCKER IMAGES
# Image PARAMETRAGES
docker-parametrages:
runs-on: ubuntu-latest
needs: build-parametrages
steps:
# Préparation de l'environnement
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: -buildx-${{ github.sha }}
restore-keys: |
-buildx-
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Préparation de la version
-
name: Get the version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
# Build
- uses: actions/download-artifact@v3
id: downloadService
name: Download Service Paramétrages
with:
name: parametrages-runner
- uses: actions/download-artifact@v3
id: downloadDocker
name: Download DockerFile
with:
name: Dockerfile.native-micro
-
name: Build and push Service Paramétrages
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.native-micro
push: true
tags: vzwingmabudget/gestion_budget_services:parametrages-latest, vzwingmabudget/gestion_budget_services:parametrages-${{ steps.get_version.outputs.VERSION }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
# Image UTILISATEURS
docker-utilisateurs:
runs-on: ubuntu-latest
needs: build-utilisateurs
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: -buildx-${{ github.sha }}
restore-keys: |
-buildx-
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Préparation de la version
-
name: Get the version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
# Build
- uses: actions/download-artifact@v3
id: downloadService
name: Download Service Utilisateurs
with:
name: utilisateurs-runner
- uses: actions/download-artifact@v3
id: downloadDocker
name: Download DockerFile
with:
name: Dockerfile.native-micro
-
name: Build and push Service Utilisateurs
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.native-micro
push: true
tags: vzwingmabudget/gestion_budget_services:utilisateurs-latest, vzwingmabudget/gestion_budget_services:utilisateurs-${{ steps.get_version.outputs.VERSION }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
# Image COMPTES
docker-comptes:
runs-on: ubuntu-latest
needs: build-comptes
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: -buildx-${{ github.sha }}
restore-keys: |
-buildx-
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Préparation de la version
-
name: Get the version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
# Build
- uses: actions/download-artifact@v3
id: downloadService
name: Download Service Comptes
with:
name: comptes-runner
- uses: actions/download-artifact@v3
id: downloadDocker
name: Download DockerFile
with:
name: Dockerfile.native-micro
-
name: Build and push Service Comptes
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.native-micro
push: true
tags: vzwingmabudget/gestion_budget_services:comptes-latest, vzwingmabudget/gestion_budget_services:comptes-${{ steps.get_version.outputs.VERSION }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
# Image OPERATIONS
docker-operations:
runs-on: ubuntu-latest
needs: build-operations
steps:
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: -buildx-${{ github.sha }}
restore-keys: |
-buildx-
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Préparation de la version
-
name: Get the version
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3 | cut -b 2- ) >> $GITHUB_OUTPUT
# Build
- uses: actions/download-artifact@v3
id: downloadService
name: Download Service Opérations
with:
name: operations-runner
- uses: actions/download-artifact@v3
id: downloadDocker
name: Download DockerFile
with:
name: Dockerfile.native-micro
-
name: Build and push Service Opérations
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.native-micro
push: true
tags: vzwingmabudget/gestion_budget_services:operations-latest, vzwingmabudget/gestion_budget_services:operations-${{ steps.get_version.outputs.VERSION }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}