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

Align the preview_0_4_x branch #268

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
0b9c11c
chore(deps): bump org.flywaydb:flyway-core from 9.15.2 to 9.16.3 (#242)
dependabot[bot] Apr 19, 2023
d268bf0
chore(deps): bump com.google.code.gson:gson from 2.10 to 2.10.1 (#243)
dependabot[bot] Apr 19, 2023
f30e78a
refactor: update GitHub output command to current version (#233)
gcs14 Apr 19, 2023
31bfed7
fix: only run trivy when docker images were actually built (#240)
paullatzelsperger Apr 19, 2023
6521dc3
refactor: Extract the setup-java action into a re-usable action (#246)
tuncaytunc-zf Apr 19, 2023
04985e0
feat(BusinessPartnerValidation): adds logging if it's enabled on cont…
wolf4ood Apr 19, 2023
463c909
release-fix: use correct value
paullatzelsperger Apr 19, 2023
98988da
Release version 0.3.3 (#249)
github-actions[bot] Apr 19, 2023
93b2ad9
Introduce new snapshot version 0.3.4-SNAPSHOT
web-flow Apr 19, 2023
52a3ecd
release-fix: allow manual entry of Docker tag
paullatzelsperger Apr 19, 2023
42b8d03
chore: Add 0.3.3 to, and fix markdown in CHANGELOG.md (#252)
paullatzelsperger Apr 20, 2023
761ee87
docs: add decision record about conventional commits (#255)
paullatzelsperger Apr 20, 2023
524914b
fix: README.md points to wrong helm chart (#261)
florianrusch-zf Apr 20, 2023
69e84e9
feature: add explicit docker image creation during release process (#…
paullatzelsperger Apr 21, 2023
cd799fd
build(deps): add constraints to avoid vulnerable transitive dependenc…
ndr-brt Apr 21, 2023
76f2a15
chore: Rename Veracode appname in CI job (#265)
tuncaytunc-zf Apr 21, 2023
0579cc6
fix: Typo in veracode action (#267)
tuncaytunc-zf Apr 21, 2023
04e632e
Adapt Postman collection for 0.3.x (#232)
tuncaytunc-zf Apr 21, 2023
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
17 changes: 6 additions & 11 deletions .github/actions/publish-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ inputs:
docker_token:
required: false
description: "DockerHub Token. No push is done if omitted"
docker_tag:
required: false
description: 'additional docker tags'
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/[email protected]

#####################
# Login to DockerHub
Expand All @@ -56,12 +58,7 @@ runs:
#####################
# Build JAR file
#####################
- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- uses: ./.github/actions/setup-java
- name: Build Controlplane
shell: bash
run: |-
Expand All @@ -78,9 +75,7 @@ runs:
images: |
${{ inputs.namespace }}/${{ inputs.imagename }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{version}},value=${{ inputs.docker_tag }}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{raw}}
Expand Down
10 changes: 2 additions & 8 deletions .github/actions/run-deployment-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,15 @@ inputs:
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/[email protected]

- name: Cache ContainerD Image Layers
uses: actions/cache@v3
with:
path: /var/lib/containerd/io.containerd.snapshotter.v1.overlayfs
key: ${{ runner.os }}-io.containerd.snapshotter.v1.overlayfs

- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: '11'
distribution: 'temurin'
cache: 'gradle'
- uses: ./.github/actions/setup-java

- name: Build docker images
shell: bash
Expand Down
32 changes: 32 additions & 0 deletions .github/actions/setup-java/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#
# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

---
name: "Setup JDK 17"
description: "Setup JDK 17"
runs:
using: "composite"
steps:
- name: Setup JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
77 changes: 21 additions & 56 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,25 +60,19 @@ jobs:
- name: Check whether secrets exist
id: secret-presence
run: |
[ ! -z "${{ secrets.SONAR_TOKEN }}" ] && echo "::set-output name=SONAR_TOKEN::true"
[ ! -z "${{ secrets.GPG_PRIVATE_KEY }}" ] && echo "::set-output name=GPG_PRIVATE_KEY::true"
[ ! -z "${{ secrets.GPG_PASSPHRASE }}" ] && echo "::set-output name=GPG_PASSPHRASE::true"
[ ! -z "${{ secrets.DOCKER_HUB_TOKEN }}" ] && echo "::set-output name=DOCKER_HUB_TOKEN::true"
[ ! -z "${{ secrets.SONAR_TOKEN }}" ] && echo "SONAR_TOKEN=true" >> $GITHUB_OUTPUT
[ ! -z "${{ secrets.GPG_PRIVATE_KEY }}" ] && echo "GPG_PRIVATE_KEY=true" >> $GITHUB_OUTPUT
[ ! -z "${{ secrets.GPG_PASSPHRASE }}" ] && echo "GPG_PASSPHRASE=true" >> $GITHUB_OUTPUT
[ ! -z "${{ secrets.DOCKER_HUB_TOKEN }}" ] && echo "DOCKER_HUB_TOKEN=true" >> $GITHUB_OUTPUT
exit 0

build-extensions:
runs-on: ubuntu-latest
needs: [ secret-presence ]
steps:
# Set-Up
- name: Checkout
uses: actions/[email protected]
- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- uses: actions/[email protected]
- uses: ./.github/actions/setup-java
# Build
- name: Build Extensions
run: |-
Expand All @@ -87,53 +81,31 @@ jobs:
GITHUB_PACKAGE_USERNAME: ${{ github.actor }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

build-controlplane:
name: "Create Docker Images for the ControlPlane"
runs-on: ubuntu-latest
needs: [ secret-presence ]
if: |
needs.secret-presence.outputs.DOCKER_HUB_TOKEN
strategy:
fail-fast: false
matrix:
name:
- edc-runtime-memory
- edc-controlplane-memory-hashicorp-vault
- edc-controlplane-postgresql
- edc-controlplane-postgresql-hashicorp-vault
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/publish-docker-image
with:
rootDir: edc-controlplane/${{ matrix.name }}
imagename: ${{ matrix.name }}
docker_user: ${{ secrets.DOCKER_HUB_USER }}
docker_token: ${{ secrets.DOCKER_HUB_TOKEN }}

build-dataplane:
name: "Create Docker Images for the DataPlane"
build-docker-images:
name: "Create Docker Images"
runs-on: ubuntu-latest
needs: [ secret-presence ]
if: |
needs.secret-presence.outputs.DOCKER_HUB_TOKEN
strategy:
fail-fast: false
matrix:
name:
- edc-dataplane-azure-vault
- edc-dataplane-hashicorp-vault
variant: [ { dir: edc-controlplane, img: edc-runtime-memory },
{ dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql },
{ dir: edc-dataplane, img: edc-dataplane-azure-vault },
{ dir: edc-dataplane, img: edc-dataplane-hashicorp-vault } ]
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/[email protected]
- uses: ./.github/actions/publish-docker-image
name: Publish ${{ matrix.variant.img }}
with:
rootDir: edc-dataplane/${{ matrix.name }}
imagename: ${{ matrix.name }}
docker_tag: ${{ needs.release-version.outputs.RELEASE_VERSION }}
rootDir: ${{ matrix.variant.dir }}/${{ matrix.variant.img }}
imagename: ${{ matrix.variant.img }}
docker_user: ${{ secrets.DOCKER_HUB_USER }}
docker_token: ${{ secrets.DOCKER_HUB_TOKEN }}

Expand All @@ -149,15 +121,9 @@ jobs:
needs.secret-presence.outputs.GPG_PASSPHRASE && needs.secret-presence.outputs.GPG_PRIVATE_KEY && github.event_name != 'pull_request' && github.ref != 'refs/heads/releases'
steps:
# Set-Up
- name: Checkout
uses: actions/[email protected]
- uses: actions/[email protected]

- name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
- uses: ./.github/actions/setup-java
- name: Import GPG Key
uses: crazy-max/ghaction-import-gpg@v5
with:
Expand All @@ -173,4 +139,3 @@ jobs:
REPO: ${{ github.repository }}
GITHUB_PACKAGE_USERNAME: ${{ github.actor }}
GITHUB_PACKAGE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

10 changes: 3 additions & 7 deletions .github/workflows/business-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,9 @@ jobs:
### Set-Up ###
##############
-
name: Checkout
uses: actions/[email protected]
-
name: Set-Up JDK 11
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
uses: ./.github/actions/setup-java
-
name: Cache ContainerD Image Layers
uses: actions/cache@v3
Expand Down Expand Up @@ -185,6 +179,7 @@ jobs:
--set dataplane.image.repository=docker.io/library/edc-dataplane-hashicorp-vault \
--set controlplane.debug.enabled=true \
--set controlplane.suspendOnStart=false \
--set controlplane.businesspartnervalidation.log.agreement.validation=true \
--set postgresql.enabled=true \
--set postgresql.username=user \
--set postgresql.password=password \
Expand Down Expand Up @@ -218,6 +213,7 @@ jobs:
--set dataplane.image.repository=docker.io/library/edc-dataplane-hashicorp-vault \
--set controlplane.debug.enabled=true \
--set controlplane.suspendOnStart=false \
--set controlplane.businesspartnervalidation.log.agreement.validation=true \
--set postgresql.enabled=true \
--set postgresql.username=user \
--set postgresql.password=password \
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deployment-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ jobs:
deployment-test-memory:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/[email protected]
- uses: ./.github/actions/run-deployment-test
name: "Run deployment test using KinD and Helm"
with:
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/draft-new-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,7 @@ jobs:
git config user.name "GitHub actions"
git config user.email [email protected]
-
name: Set up JDK 11
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'temurin'
cache: 'gradle'
uses: ./.github/actions/setup-java
-
name: Bump version in gradle.properties
run: |-
Expand Down Expand Up @@ -68,7 +63,7 @@ jobs:
git add CHANGELOG.md gradle.properties $(find charts -name Chart.yaml) $(find charts -name README.md)
git commit --message "Prepare release ${{ github.event.inputs.version }}"

echo "::set-output name=commit::$(git rev-parse HEAD)"
echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
-
name: Push new branch
run: git push origin release/${{ github.event.inputs.version }}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/helm-chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ jobs:

steps:
# fetch-depth: 0 is required to determine differences in chart(s)
- name: Checkout
uses: actions/checkout@v3
- uses: actions/[email protected]
with:
fetch-depth: 0

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/helm-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
### Set-Up ###
##############
-
name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
Expand All @@ -52,7 +51,7 @@ jobs:
run: |
changed=$(ct list-changed --config ct.yaml --target-branch main)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
echo "changed=true" >> $GITHUB_OUTPUT
fi
-
name: chart-testing (lint)
Expand Down
49 changes: 15 additions & 34 deletions .github/workflows/publish-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,58 +28,39 @@ on:
description: 'The namespace (=repo) in DockerHub'
required: false
default: "tractusx"
docker_tag:
description: 'Explicitly specify the Docker tag. Note that SHA and latest are added automatically.'
required: false

concurrency:
# cancel only running jobs on pull requests
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
create-docker-image-controlplane:
create-docker-image:
name: "Create Docker Images for the ControlPlane"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name:
- edc-runtime-memory
- edc-controlplane-memory-hashicorp-vault
- edc-controlplane-postgresql
- edc-controlplane-postgresql-hashicorp-vault
variant: [ { dir: edc-controlplane, img: edc-runtime-memory },
{ dir: edc-controlplane, img: edc-controlplane-memory-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql },
{ dir: edc-dataplane, img: edc-dataplane-azure-vault },
{ dir: edc-dataplane, img: edc-dataplane-hashicorp-vault } ]
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/[email protected]
- uses: ./.github/actions/publish-docker-image
name: Publish ${{ matrix.variant.img }}
with:
rootDir: edc-controlplane/${{ matrix.name }}
imagename: ${{ matrix.name }}
docker_tag: ${{ needs.release-version.outputs.RELEASE_VERSION }}
rootDir: ${{ matrix.variant.dir }}/${{ matrix.variant.img }}
imagename: ${{ matrix.variant.img }}
namespace: ${{ inputs.namespace }}
docker_user: ${{ secrets.DOCKER_HUB_USER }}
docker_token: ${{ secrets.DOCKER_HUB_TOKEN }}


create-docker-image-dataplane:
name: "Create Docker Images for the DataPlane"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
name:
- edc-dataplane-azure-vault
- edc-dataplane-hashicorp-vault
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: ./.github/actions/publish-docker-image
with:
rootDir: edc-dataplane/${{ matrix.name }}
imagename: ${{ matrix.name }}
namespace: ${{ inputs.namespace }}
docker_user: ${{ secrets.DOCKER_HUB_USER }}
docker_token: ${{ secrets.DOCKER_HUB_TOKEN }}
Loading