Skip to content

Commit

Permalink
Merge branch 'dev' into feature/clean_up_and_migration
Browse files Browse the repository at this point in the history
  • Loading branch information
markostreich committed Mar 21, 2024
2 parents 4473690 + 564aba7 commit 53974d0
Show file tree
Hide file tree
Showing 131 changed files with 2,325 additions and 818 deletions.
3 changes: 1 addition & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
### Description

Short description or comments
<!-- Brief explanation of the changes and their impact -->

### Reference

Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/build-apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,15 @@ name: build apps

on:
push:
branches:
- '**'
paths:
- 'digiwf-apps/**'
pull_request:
types: [ opened, reopened ]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./digiwf-apps
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
cache-dependency-path: "./digiwf-apps/package-lock.json"
registry-url: 'https://registry.npmjs.org'
- run: npm run init
- run: npm run test
- run: npm run build
uses: ./.github/workflows/workflow-build-apps.yaml
with:
publish-packages: false
build-images: ${{ github.ref_name == 'dev' }}
release-version: 'dev'
secrets: inherit
22 changes: 5 additions & 17 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,16 @@ name: build docs

on:
push:
branches:
- '**'
pull_request:
types: [ opened, reopened ]
paths:
- 'docs/**'
pull_request:

env:
NODE_OPTIONS: '--openssl-legacy-provider'

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: "./digiwf-apps/package-lock.json"
- run: npm install
- run: npm run build
uses: ./.github/workflows/workflow-build-docs.yaml
with:
publish: false
secrets: inherit
47 changes: 13 additions & 34 deletions .github/workflows/build-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,19 @@ name: build services

on:
push:
paths-ignore:
- '.github/**'
- 'digiwf-apps/**'
- 'docs/**'
- 'stack/**'
pull_request:
types: [opened, reopened]

jobs:
build-maven:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: "maven"
server-id: camunda-bpm-nexus-ee
server-username: CAMUNDA_USER_REF
server-password: CAMUNDA_TOKEN_REF

- name: Prepare mvnw
run: chmod +x ./mvnw

- name: Build with Maven
run: ./mvnw --batch-mode --update-snapshots --no-transfer-progress verify
env:
CAMUNDA_USER_REF: ${{ secrets.CAMUNDA_USER }}
CAMUNDA_TOKEN_REF: ${{ secrets.CAMUNDA_USER_PASSWORD }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./digiwf-coverage/target/coverage/
fail_ci_if_error: false
files: ./digiwf-coverage/target/coverage/jacoco.xml
flags: unittests
name: digiwf-core
verbose: true
build:
uses: ./.github/workflows/workflow-build-services.yaml
with:
snapshot-release: true
build-images: ${{ github.ref_name == 'dev' }}
release-version: dev
maven-release: false
secrets: inherit
14 changes: 9 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,31 +78,35 @@ jobs:
release-apps:
if: github.event.inputs.apps == 'true'
needs: release-version
uses: ./.github/workflows/workflow-release-apps.yaml
uses: ./.github/workflows/workflow-build-apps.yaml
with:
snapshot-release: ${{ github.event.inputs.snapshot-build == 'true' }}
publish-packages: ${{ github.event.inputs.snapshot-build == 'false' }}
build-images: true
release-version: ${{ needs.release-version.outputs.apps-release-version }}
secrets: inherit

release-services:
if: github.event.inputs.services == 'true'
needs: release-version
uses: ./.github/workflows/workflow-release-services.yaml
uses: ./.github/workflows/workflow-build-services.yaml
with:
snapshot-release: ${{ github.event.inputs.snapshot-build == 'true' }}
release-version: ${{ needs.release-version.outputs.services-release-version }}
maven-release: ${{ github.event.inputs.maven == 'true' }}
build-images: true
secrets: inherit

release-docs:
if: github.event.inputs.docs == 'true'
needs: release-version
uses: ./.github/workflows/workflow-release-docs.yaml
uses: ./.github/workflows/workflow-build-docs.yaml
with:
publish: ${{ github.event.inputs.snapshot-build == 'false' }}
secrets: inherit

github-release:
if: github.event.inputs.snapshot-build == 'false' && always() && !contains(needs.*.result, 'failure')
needs: [release-apps, release-services, release-docs]
needs: [ release-apps, release-services, release-docs ]
uses: ./.github/workflows/workflow-github-release.yaml
with:
release-tag: ${{ github.event.inputs.release-tag }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ name: Release apps
on:
workflow_call:
inputs:
snapshot-release:
description: 'Snapshot release?'
publish-packages:
description: 'Publish packages?'
type: boolean
required: true
default: false
build-images:
description: 'Build and push images?'
type: boolean
required: true
default: false
Expand All @@ -14,7 +19,7 @@ on:
required: false

jobs:
release-apps:
build-apps:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -28,28 +33,33 @@ jobs:
cache-dependency-path: "./digiwf-apps/package-lock.json"
registry-url: 'https://registry.npmjs.org'
- run: npm run init
- run: npm run test
- run: npm run build

- run: lerna publish from-package --yes
if: inputs.snapshot-release == false
if: inputs.publish-packages == true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Set up QEMU
if: inputs.build-images == true
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
if: inputs.build-images == true
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
if: inputs.build-images == true
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_KEY }}

- name: Build and push tasklist
if: inputs.build-images == true
uses: docker/build-push-action@v5
with:
context: ./digiwf-apps/packages/apps/digiwf-tasklist
push: true
tags: itatm/digiwf-tasklist:${{ inputs.release-version }},itatm/digiwf-tasklist:dev
tags: itatm/digiwf-tasklist:${{ inputs.release-version }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ name: Release Docs

on:
workflow_call:
workflow_dispatch:
inputs:
publish:
description: 'Publish docs?'
type: boolean
required: true
default: false

jobs:
release-docs:
build-docs:
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -21,6 +26,7 @@ jobs:
- run: npm install
- run: npm run build
- name: Deploy
if: inputs.publish == true
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading

0 comments on commit 53974d0

Please sign in to comment.