Skip to content

Commit

Permalink
Merge branch 'feat/new_platform' into feature/miranum-deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoesle committed Apr 9, 2024
2 parents 6537737 + f2d55fd commit e5c394f
Show file tree
Hide file tree
Showing 51 changed files with 399 additions and 229 deletions.
9 changes: 2 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
open-pull-requests-limit: 20
schedule:
interval: weekly
labels:
- "Technical Debt"
- package-ecosystem: "maven"
directory: "/"
open-pull-requests-limit: 20
schedule:
interval: weekly
labels:
- "Technical Debt"
- package-ecosystem: npm
directory: "/apps"
target-branch: "dev"
labels:
- "Technical Debt"
schedule:
interval: weekly
5 changes: 5 additions & 0 deletions .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
feature: ['feature/*', 'feat/*']
bug: ['bug/*', 'fix/*', 'bugfix/*']
refactoring: ['refactoring/*']
chore: ['chore/*']
docs: ['docs/*']
18 changes: 18 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
changelog:
categories:
- title: 🎉 New Features
labels:
- feature
- title: 🐞 Bug Fixes
labels:
- bug
- title: 🔨 Refactoring
labels:
- refactoring
- title: 📔 Documentation
labels:
- docs
- title: 🛠️ Misc
labels:
- Technical Debt
- chore
120 changes: 19 additions & 101 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,110 +2,28 @@ name: Build Application

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build_miranum_platform:
# maven build if branch != dev
# if branch dev == dev build and release docker images with dev tag
maven-build:
uses: ./.github/workflows/workflow-build-and-release-services.yml
with:
release-version: dev
snapshot-release: true
maven-release: false
# FIXME rename the feat/new_platform branch
# docker-release: ${{ github.ref_name == 'dev' }}
docker-release: ${{ github.ref_name == 'feat/new_platform' }}
secrets: inherit

labelPR:
name: Label PR
runs-on: ubuntu-latest
steps:
- name: PREP / Checkout sources
uses: actions/checkout@v4
- name: PREP / Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
- name: PREP / Set up QEMU
uses: docker/setup-qemu-action@v3
- name: PREP / Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: PREP / Set Release version env variable
run: |
echo "RELEASE_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
# BUILD ALL SERVICES USING MAVEN
- name: BUILD / SERVICES / Execute Maven build
run: ./mvnw package
# BUILD TASKLIST-WEB-APP
- name: BUILD / APPS / Install dependencies
run: ./mvnw -f apps clean install
- name: BUILD / APPS / Build Tasklist-Web-App
run: ./mvnw -f apps -Pbuild
# DOCKERIZE ENGINE-TASKLIST-SERVICE
- name: DOCKERIZE / Engine-Tasklist-Service / Build image
run: docker build ./services/engine-tasklist-service/. -t miragon/miranum-platform-engine-tasklist-service:${{ env.RELEASE_VERSION }}
- name: DOCKERIZE / Engine-Tasklist-Service / Scan image
id: scan-engine-tasklist-service
uses: anchore/scan-action@v3
with:
image: miragon/miranum-platform-engine-tasklist-service:${{ env.RELEASE_VERSION }}
fail-build: false
debug: false
acs-report-enable: true
- name: DOCKERIZE / Engine-Tasklist-Service / Parse SARIF file
uses: Miragon/[email protected]
with:
sarif-file: ${{ steps.scan-engine-tasklist-service.outputs.sarif }}
# DOCKERIZE SCHEMA-REGISTRY-SERVICE
- name: DOCKERIZE / Schema-Registry-Service / Build image
run: docker build ./services/schema-registry-service/. -t miragon/miranum-platform-schema-registry-service:${{ env.RELEASE_VERSION }}
- name: DOCKERIZE / Schema-Registry-Service / Scan image
id: scan-schema-registry-service
uses: anchore/scan-action@v3
with:
image: miragon/miranum-platform-schema-registry-service:${{ env.RELEASE_VERSION }}
fail-build: false
debug: false
acs-report-enable: true
- name: DOCKERIZE / Schema-Registry-Service / Parse SARIF file
uses: Miragon/[email protected]
with:
sarif-file: ${{ steps.scan-schema-registry-service.outputs.sarif }}
# DOCKERIZE DEPLOYMENT-SERVICE
- name: DOCKERIZE / Deployment-Service / Build image
run: docker build ./services/deployment-service/. -t miragon/miranum-platform-deployment-service:${{ env.RELEASE_VERSION }}
- name: DOCKERIZE / Deployment-Service / Scan image
id: scan-deployment-service
uses: anchore/scan-action@v3
with:
image: miragon/miranum-platform-deployment-service:${{ env.RELEASE_VERSION }}
fail-build: false
debug: false
acs-report-enable: true
- name: DOCKERIZE / Deployment-Service / Parse SARIF file
uses: Miragon/[email protected]
with:
sarif-file: ${{ steps.scan-deployment-service.outputs.sarif }}
# DOCKERIZE S3-INTEGRATION-SERVICE
- name: DOCKERIZE / S3-Integration-Service / Build image
run: docker build ./services/s3-integration-service/. -t miragon/miranum-platform-s3-integration-service:${{ env.RELEASE_VERSION }}
- name: DOCKERIZE / S3-Integration-Service / Scan image
id: scan-s3-integration-service
uses: anchore/scan-action@v3
with:
image: miragon/miranum-platform-s3-integration-service:${{ env.RELEASE_VERSION }}
fail-build: false
debug: false
acs-report-enable: true
- name: DOCKERIZE / S3-Integration-Service / Parse SARIF file
uses: Miragon/[email protected]
with:
sarif-file: ${{ steps.scan-s3-integration-service.outputs.sarif }}
# DOCKERIZE TASKLIST-WEB-APP
- name: DOCKERIZE / Tasklist-Webapp / Build image
run: docker build ./apps/packages/apps/digiwf-tasklist/. -t miragon/miranum-platform-tasklist-webapp:${{ env.RELEASE_VERSION }}
- name: DOCKERIZE / Tasklist-Webapp / Scan image
id: scan-tasklist-webapp
uses: anchore/scan-action@v3
with:
image: miragon/miranum-platform-tasklist-webapp:${{ env.RELEASE_VERSION }}
fail-build: false
debug: false
acs-report-enable: true
- name: DOCKERIZE / Tasklist-Webapp / Parse SARIF file
uses: Miragon/[email protected]
- uses: TimonVS/pr-labeler-action@v5
if: github.event_name == 'pull_request'
with:
sarif-file: ${{ steps.scan-tasklist-webapp.outputs.sarif }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/pr-labeler.yml
71 changes: 0 additions & 71 deletions .github/workflows/publish.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
workflow_dispatch:
inputs:
release-tag:
description: 'Release Tag'
required: false
default: 'services_XXX_apps_XXX'
maven-new-version:
description: '(Optional) Specify new maven version - SNAPSHOT will be added to the version'
required: false

jobs:
release-version:
runs-on: ubuntu-latest
steps:
- uses: PREP / actions/checkout@v4
- name: PREP / Prepare mvnw
run: chmod +x ./mvnw
- name: PREP / Remove snapshot from services
run: ./mvnw versions:set --batch-mode -DremoveSnapshot -DprocessAllModules
- name: PREP / Set services release version env variable
run: echo "SERVICES_RELEASE_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
outputs:
services-release-version: ${{ env.SERVICES_RELEASE_VERSION }}

release-services:
needs: release-version
uses: ./.github/workflows/workflow-build-and-release-services.yml
with:
release-version: ${{ needs.release-version.outputs.services-release-version }}
snapshot-release: false
maven-release: true
docker-release: true
secrets: inherit

github-release:
needs: release-services
uses: ./.github/workflows/workflow-github-release.yaml
with:
release-tag: ${{ github.event.inputs.release-tag }}
secrets: inherit

bump-versions:
needs: github-release
uses: ./.github/workflows/workflow-bump-version.yaml
with:
new-maven-version: ${{ github.event.inputs.maven-new-version }}
secrets: inherit

Loading

0 comments on commit e5c394f

Please sign in to comment.