Skip to content

Commit

Permalink
Merge branch 'refs/heads/dev' into 39-db-für-entwicklung-von-broadcas…
Browse files Browse the repository at this point in the history
…t-service-bereitstellen

# Conflicts:
#	wls-broadcast-service/src/main/resources/application-local.yml
  • Loading branch information
MrSebastian committed Apr 16, 2024
2 parents 2a2d048 + 57aa80f commit 2aecaa4
Show file tree
Hide file tree
Showing 37 changed files with 678 additions and 215 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/build_wls-common_pull-request.yaml

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/callable-create-github-container-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: callable build github container image
on:
workflow_call:
inputs:
tag:
required: false
default: ''
type: string
description: 'optional tag that is used for build; default: github.ref'
service:
required: true
type: string
description: 'name of service to use'

env:
REGISTRY: ghcr.io

jobs:
build-and-publish-image:
permissions:
packages: write
runs-on: ubuntu-latest
steps:

- name: Check out Git repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref}}

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
cache: 'maven'
cache-dependency-path: ${{ inputs.service }}/pom.xml
java-version: '17'
distribution: 'temurin'

- name: build jar without tests
run: mvn -B -ntp -DskipTests package -f ${{ inputs.service }}/pom.xml

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}-${{ inputs.service }}
context: git
# tags:
# - Major
# - Major.Minor
# - Major.Minor.Patch
# - full semver: 1.2.3-RC2
# - latest
tags: |
type=match,pattern=(${{ inputs.service }})/v(\d).\d.\d,group=2,enable=${{ inputs.tag != '' }}
type=match,pattern=(${{ inputs.service }})/v(\d.\d).\d,group=2,enable=${{ inputs.tag != '' }}
type=match,pattern=(${{ inputs.service }})/v(\d.\d.\d),group=2,enable=${{ inputs.tag != '' }}
type=match,pattern=(${{ inputs.service }})/v(.*),group=2,enable=${{ inputs.tag != '' }}
type=raw,value=latest,enable=${{ inputs.tag != '' }}
type=raw,value=latest-dev
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: ./${{ inputs.service }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
49 changes: 49 additions & 0 deletions .github/workflows/callable-create-github-release-from-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: callable build github release from tag
on:
workflow_call:
inputs:
tag:
required: true
type: string
description: 'tag that is used for build'
service:
required: true
type: string
description: 'name of service to use'

env:
REGISTRY: ghcr.io

jobs:
create-github-release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:

- name: Check out Git repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag }}

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
cache: 'maven'
cache-dependency-path: '${{ inputs.service }}/pom.xml'
java-version: '17'
distribution: 'temurin'

- name: build jar without tests
run: mvn -B -ntp -DskipTests package -f ${{ inputs.service }}/pom.xml

- name: Create GitHub Release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: |
${{ inputs.service }}/target/*.jar
tag_name: ${{ inputs.tag }}
draft: false
prerelease: false
generate_release_notes: false
25 changes: 25 additions & 0 deletions .github/workflows/callable-run-mvn-verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: callable run mvn verify

on:
workflow_call:
inputs:
pom-dir:
required: true
type: string

jobs:
checkout-and-verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
cache-dependency-path: '${{ inputs.pom-dir }}/pom.xml'

- name: Build with Maven
run: mvn -B -ntp -f ${{ inputs.pom-dir }}/pom.xml verify
File renamed without changes.
61 changes: 61 additions & 0 deletions .github/workflows/dispatch-microservice-mvn-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: dispatch microserivce maven release

on:
workflow_dispatch:
inputs:
release-version:
required: true
description: release version to build
development-version:
required: true
description: next development version to set
service:
required: true
description: service/directory to build (wls-broadcast-service, ...)

jobs:
run-mvn-release-prepare:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Setup git user
uses: fregante/setup-git-user@v2
- name: Install Java and Maven
uses: actions/setup-java@v4
with:
java-version: 17
distribution: "temurin"
cache: 'maven'
cache-dependency-path: '${{ github.event.inputs.service }}/pom.xml'
- name: Perform maven release
run: >
mvn -B -ntp release:prepare -f ${{ github.event.inputs.service }}/pom.xml
-DreleaseVersion=${{ github.event.inputs.release-version }}
-DdevelopmentVersion=${{ github.event.inputs.development-version }}
-Dtag=${{ github.event.inputs.service }}/v${{ github.event.inputs.release-version }}
-Darguments="-DskipTests"
build-github-release:
permissions:
contents: write
needs:
- run-mvn-release-prepare
uses:
./.github/workflows/callable-create-github-release-from-tag.yml
with:
tag: ${{ github.event.inputs.service }}/v${{ github.event.inputs.release-version }}
service: ${{ github.event.inputs.service }}

build-github-container-image:
permissions:
packages: write
needs:
- run-mvn-release-prepare
uses:
./.github/workflows/callable-create-github-container-image.yml
with:
tag: ${{ github.event.inputs.service }}/v${{ github.event.inputs.release-version }}
service: ${{ github.event.inputs.service }}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: build docs
name: verify pull request docs

on:
pull_request:
paths:
- 'docs/**'

jobs:
build:
run-docs-build:
runs-on: ubuntu-latest
defaults:
run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: release docs
name: build push dev docs

on:
push:
branches:
- dev
paths:
- 'docs/**'
- '.github/workflows/release-doc.yaml'
- '.github/workflows/doc_push-dev.yaml'

jobs:
build:
build-and-publish:
runs-on: ubuntu-latest
defaults:
run:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/wls-broadcast-service_pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: verify pull request broadcast-service

on:
pull_request:
paths:
- 'wls-broadcast-service/**'
- '.github/workflows/wls-broadcast-service_pull-request.yml'

jobs:
verify-pull-request:
uses:
./.github/workflows/callable-run-mvn-verify.yml
with:
pom-dir: 'wls-broadcast-service'
18 changes: 18 additions & 0 deletions .github/workflows/wls-broadcast-service_push-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: build push dev broadcast-service

on:
push:
branches:
- dev
paths:
- 'wls-broadcast-service/**'
- '.github/workflows/wls-broadcast-service_push-dev.yml'

jobs:
build-github-container-image:
permissions:
packages: write
uses:
./.github/workflows/callable-create-github-container-image.yml
with:
service: 'wls-broadcast-service'
13 changes: 13 additions & 0 deletions .github/workflows/wls-common_pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: verify pull request wls-common

on:
pull_request:
paths:
- 'wls-common/**'

jobs:
verify-pull-request:
uses:
./.github/workflows/callable-run-mvn-verify.yml
with:
pom-dir: 'wls-common'
47 changes: 47 additions & 0 deletions docs/.vitepress/components/adr/status.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<template>
<div style="margin-top: 4px">
<span
><svg height="24px" viewBox="0 0 24 24">
<path :d="svgPath" :fill="svgFillColor"></path></svg
></span>
<span class="statusText">{{ statusI18nText }}</span>
</div>
</template>

<script setup>
import { useStatus, Status } from "../../composables/status";
import { useData } from "vitepress";
import { computed } from "vue";
const props = defineProps({
status: {
type: Status,
required: true,
},
});
const { lang } = useData();
const statusComposable = useStatus();
const statusI18nText = computed(() =>
statusComposable.statusToI18NTextOrEmpty(lang.value, props.status),
);
const svgPath = computed(() =>
statusComposable.statusToIconPathOrEmpty(props.status),
);
const svgFillColor = computed(() =>
statusComposable.statusToColorOrEmpty(props.status),
);
</script>

<style scoped>
div {
display: flex;
}
.statusText {
margin-left: 4px;
}
</style>
14 changes: 14 additions & 0 deletions docs/.vitepress/components/adr/status/overview.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<template>
<div v-for="status in Status" :key="status">
<adr-status :status="status"></adr-status>
</div>
</template>

<script setup>
import {Status, useStatus} from "../../../composables/status";
import {useData} from "vitepress";
const statusComposable = useStatus();
const {lang} = useData();
</script>
Loading

0 comments on commit 2aecaa4

Please sign in to comment.