Skip to content

Commit

Permalink
Release version 6.6.0 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger authored Jul 30, 2024
2 parents 04bb4e1 + 6da6b4c commit 9ba1fd7
Show file tree
Hide file tree
Showing 115 changed files with 2,094 additions and 1,239 deletions.
24 changes: 7 additions & 17 deletions .github/actions/publish-docker-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,12 @@ inputs:
docker_tag:
required: false
description: 'additional docker tags'
do_push:
required: false
default: 'false'
description: 'whether or not to actually push the image'

runs:
using: "composite"
steps:
- uses: actions/checkout@v4

- name: Download OpenTelemetry
shell: bash
run: |-
# "jq -r" removes the quotation marks, that would trip up "wget"
URL=$(grep "val openTelemetryAgentUrl = " build.gradle.kts | awk -F'= ' '{print $2}' | jq -r)
wget -O ${{ inputs.rootDir }}/opentelemetry-javaagent.jar -q $URL
#####################
# Login to DockerHub
#####################
Expand Down Expand Up @@ -102,12 +91,13 @@ runs:
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ${{ inputs.rootDir }}/src/main/docker/Dockerfile
context: ${{ inputs.rootDir }}
file: ${{ inputs.rootDir }}/build/resources/docker/Dockerfile
build-args: |
JAR=${{ inputs.rootDir }}/build/libs/${{ inputs.imagename }}.jar
OTEL_JAR=${{ inputs.rootDir }}/opentelemetry-javaagent.jar
push: ${{ inputs.do_push == 'true' }}
JAR=build/libs/${{ inputs.imagename }}.jar
OTEL_JAR=build/resources/otel/opentelemetry-javaagent.jar
ADDITIONAL_FILES=build/legal/*
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

Expand Down
15 changes: 11 additions & 4 deletions .github/actions/run-deployment-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description: "Build and publish a Docker Image to DockerHub"
inputs:
imagename:
required: true
description: "name of the docker image, e.g. edc-runtime-memory"
description: "list of docker image names separated by whitespace, e.g. 'edc-runtime-memory edc-runtime-other'"

image_tag:
required: false
Expand All @@ -38,7 +38,7 @@ inputs:

rootDir:
required: true
description: "The directory that contains the docker file, e.g. edc-controlplane/edc-runtime-memory"
description: "list of directories of the modules to be dockerized, separated by whitespace, e.g. 'edc-controlplane/edc-runtime-memory edc-dataplane/edc-dataplane-memory'"

k8sversion:
required: false
Expand Down Expand Up @@ -69,12 +69,19 @@ runs:
- name: Build docker images
shell: bash
run: |-
./gradlew -p ${{ inputs.rootDir }} dockerize
modules=(${{ inputs.rootDir }})
for module in "${modules[@]}"
do
./gradlew -p $module dockerize
done
- name: Load images into KinD
shell: bash
run: |
kind get clusters | xargs -n1 kind load docker-image ${{ inputs.imagename }}:${{ inputs.image_tag }} --name
images=(${{ inputs.imagename }})
versioned=( "${images[@]/%/:${{ inputs.image_tag }}}" )
versioned_images=$(IFS=' ' ; echo "${versioned[*]}")
kind get clusters | xargs -n1 kind load docker-image $versioned_images --name
###################################################
# Install the test infrastructure
Expand Down
56 changes: 1 addition & 55 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,61 +47,7 @@ updates:
# Docker
- package-ecosystem: "docker"
target-branch: main
directory: ./edc-controlplane/edc-controlplane-postgresql-azure-vault/src/main/docker/
labels:
- "dependabot"
- "docker"
schedule:
interval: "weekly"
-
package-ecosystem: "docker"
target-branch: main
directory: ./edc-controlplane/edc-controlplane-postgresql-hashicorp-vault/src/main/docker/
labels:
- "dependabot"
- "docker"
schedule:
interval: "weekly"
-
package-ecosystem: "docker"
target-branch: main
directory: ./edc-controlplane/edc-runtime-memory/src/main/docker/
labels:
- "dependabot"
- "docker"
schedule:
interval: "weekly"
-
package-ecosystem: "docker"
target-branch: main
directory: ./edc-dataplane/edc-dataplane-azure-vault/src/main/docker/
labels:
- "dependabot"
- "docker"
schedule:
interval: "weekly"
-
package-ecosystem: "docker"
target-branch: main
directory: ./edc-dataplane/edc-dataplane-hashicorp-vault/src/main/docker/
labels:
- "dependabot"
- "docker"
schedule:
interval: "weekly"
-
package-ecosystem: "docker"
target-branch: main
directory: ./edc-tests/runtime/mock-connector/src/main/docker/
labels:
- "dependabot"
- "docker"
schedule:
interval: "weekly"
-
package-ecosystem: "docker"
target-branch: main
directory: ./samples/edc-dast/edc-dast-runtime/src/main/docker/
directory: resources
labels:
- "dependabot"
- "docker"
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/deployment-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# SPDX-License-Identifier: Apache-2.0
#################################################################################


---
name: "Deployment Tests"

Expand All @@ -28,7 +27,6 @@ on:
workflow_dispatch:

jobs:

secret-presence:
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -81,17 +79,17 @@ jobs:
fail-fast: false
# this will verify that the official distribution of the Tractus-X EDC Helm chart runs on the last 3 Kubernetes versions
matrix:
k8s-version: ["v1.30.0",
"v1.29.4",
"v1.28.9"]
k8s-version: [ "v1.30.2",
"v1.29.4",
"v1.28.9" ]
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/run-deployment-test
name: "Run deployment test using KinD and Helm"
with:
imagename: "edc-controlplane-postgresql-hashicorp-vault edc-dataplane-hashicorp-vault"
rootDir: "."
rootDir: "edc-controlplane/edc-controlplane-postgresql-hashicorp-vault edc-dataplane/edc-dataplane-hashicorp-vault"
k8sversion: ${{ matrix.k8s-version }}
helm_command: |-
helm install tx-prod charts/tractusx-connector \
Expand All @@ -109,8 +107,8 @@ jobs:
test-azure-vault-postgres:
runs-on: ubuntu-latest
needs: [ test-prepare, secret-presence ]
# if: |
# needs.secret-presence.outputs.AZURE_KV_CREDS
# if: |
# needs.secret-presence.outputs.AZURE_KV_CREDS

# DEACTIVATE this job for now because our Azure Credentials are expired
# TODO: reactivate once we have refreshed Azure Credentials
Expand All @@ -125,7 +123,7 @@ jobs:
name: "Run deployment test using KinD and Helm"
with:
imagename: "edc-controlplane-postgresql-azure-vault edc-dataplane-azure-vault"
rootDir: "."
rootDir: "edc-controlplane/edc-controlplane-postgresql-azure-vault edc-dataplane/edc-dataplane-azure-vault"
helm_command: |-
az keyvault secret set --vault-name ${{ secrets.AZURE_VAULT_NAME }} --name aes-keys --value "$(cat aes.key)" > /dev/null
az keyvault secret set --vault-name ${{ secrets.AZURE_VAULT_NAME }} --name client-secret --value "$(cat client.secret)" > /dev/null
Expand Down
81 changes: 28 additions & 53 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,66 +60,26 @@ jobs:
maven-release:
name: Publish extension's release version to maven repository
needs: [ release-version ]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
steps:
- name: Export RELEASE_VERSION env
run: |
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV
# Set-Up
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java

# Import GPG Key
- uses: ./.github/actions/import-gpg-key
name: "Import GPG Key"
with:
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }}

# publish releases
- name: Publish version
env:
OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }}
OSSRH_USER: ${{ secrets.ORG_OSSRH_USERNAME }}
run: |-
echo "Publishing Version $RELEASE_VERSION to Sonatype/MavenCentral"
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --no-parallel -Pversion=$RELEASE_VERSION -Psigning.gnupg.executable=gpg -Psigning.gnupg.passphrase="${{ secrets.ORG_GPG_PASSPHRASE }}"
if: false && github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
uses: ./.github/workflows/trigger-maven-publish.yaml
secrets: inherit
with:
version: $RELEASE_VERSION

docker-release:
name: Publish Docker images
runs-on: ubuntu-latest
needs: [ release-version ]
permissions:
contents: write
if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
if: false && github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION

strategy:
fail-fast: false
matrix:
variant: [ { dir: edc-controlplane, img: edc-runtime-memory },
{ dir: edc-controlplane, img: edc-controlplane-postgresql-hashicorp-vault },
{ dir: edc-controlplane, img: edc-controlplane-postgresql-azure-vault },
{ dir: edc-dataplane, img: edc-dataplane-azure-vault },
{ dir: edc-dataplane, img: edc-dataplane-hashicorp-vault },
{ dir: edc-tests/runtime, img: mock-connector }]
steps:
- uses: actions/checkout@v4
- name: Export RELEASE_VERSION env
run: |
echo "RELEASE_VERSION=${{ needs.release-version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV
- uses: ./.github/actions/publish-docker-image
name: Publish ${{ matrix.variant.img }}
with:
docker_tag: ${{ env.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 }}
do_push: 'true'
uses: ./.github/workflows/trigger-docker-publish.yaml
secrets: inherit
with:
docker_tag: $RELEASE_VERSION

# Release: Helm Charts
helm-release:
Expand All @@ -131,7 +91,7 @@ jobs:
packages: write
pages: write

if: github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
if: false && github.event.pull_request.merged == true && needs.release-version.outputs.RELEASE_VERSION
steps:
- name: Export RELEASE_VERSION env
run: |
Expand Down Expand Up @@ -167,7 +127,7 @@ jobs:
# Release: GitHub tag & release; Merges back releases into main; Starts a new development cycle;
github-release:
name: Publish new github release
needs: [ release-version, maven-release, docker-release, helm-release ]
needs: [ release-version ]
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -206,7 +166,11 @@ jobs:
makeLatest: true
removeArtifacts: true
- uses: ./.github/actions/setup-java
- name: Merge releases back into main and set new snapshot version
- name: Print git base and head branch
run: |
echo "Git head branch: ${{ github.event.pull_request.base.ref }}"
echo "Git head branch: ${{ github.event.pull_request.head.ref }}"
- name: Merge releases back into head branch and set new snapshot version
if: github.event.pull_request.base.ref == 'releases'
run: |
# Prepare git env
Expand Down Expand Up @@ -246,6 +210,17 @@ jobs:
contents: read
needs: [ release-version ]
uses: ./.github/workflows/publish-swaggerhub.yaml
if: false
with:
downstream-version: ${{ needs.release-version.outputs.RELEASE_VERSION }}
secrets: inherit

publish-openapi-to-gh-pages:
name: "Publish OpenAPI UI spec GitHub Pages"
permissions:
contents: write
needs: [ release-version ]
uses: ./.github/workflows/publish-openapi-ui.yml
secrets: inherit
with:
version: ${{ needs.release-version.outputs.RELEASE_VERSION }}
Loading

0 comments on commit 9ba1fd7

Please sign in to comment.