-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #132 from catenax-ng/main
Pull in latest changes from catenax-ng
- Loading branch information
Showing
114 changed files
with
2,233 additions
and
677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# | ||
# 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: "Import GPG Key" | ||
description: "Imports a GPG key given in the input" | ||
inputs: | ||
gpg-private-key: | ||
required: true | ||
description: "The GPG Private Key in plain text. Can be a sub-key." | ||
runs: | ||
using: "composite" | ||
steps: | ||
# this is necessary because it creates gpg.conf, etc. | ||
- name: List Keys | ||
shell: bash | ||
run: | | ||
gpg -K --keyid-format=long | ||
- name: Import GPG Private Key | ||
shell: bash | ||
run: | | ||
echo "use-agent" >> ~/.gnupg/gpg.conf | ||
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | ||
echo -e "${{ inputs.gpg-private-key }}" | gpg --import --batch | ||
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); | ||
do | ||
echo -e "5\\ny\\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Test k8s version compatability | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
node_image_latest: | ||
description: 'First version of kindest/node image for k8s kind cluster' | ||
default: 'kindest/node:v1.27.3' | ||
required: false | ||
type: string | ||
node_image_second_latest: | ||
description: 'Second version of kindest/node image for k8s kind cluster' | ||
default: 'kindest/node:v1.26.6' | ||
required: false | ||
type: string | ||
node_image_third_latest: | ||
description: 'Third version of kindest/node image for k8s kind cluster' | ||
default: 'kindest/node:v1.25.11' | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
test-latest: | ||
uses: ./.github/workflows/helm-test.yaml | ||
with: | ||
node_image: ${{ github.event.inputs.node_image_latest || 'kindest/node:v1.27.3' }} | ||
|
||
test-second-latest: | ||
uses: ./.github/workflows/helm-test.yaml | ||
with: | ||
node_image: ${{ github.event.inputs.node_image_second_latest || 'kindest/node:v1.26.6' }} | ||
|
||
test-third-latest: | ||
uses: ./.github/workflows/helm-test.yaml | ||
with: | ||
node_image: ${{ github.event.inputs.node_image_third_latest || 'kindest/node:v1.25.11' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Upload to Central Maven Registry | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
secret-presence: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
DOCKER_HUB_TOKEN: ${{ steps.secret-presence.outputs.DOCKER_HUB_TOKEN }} | ||
HAS_OSSRH: ${{ steps.secret-presence.outputs.HAS_OSSRH }} | ||
steps: | ||
- name: Check whether secrets exist | ||
id: secret-presence | ||
run: | | ||
[ ! -z "${{ secrets.DOCKER_HUB_TOKEN }}" ] && echo "DOCKER_HUB_TOKEN=true" >> $GITHUB_OUTPUT | ||
[ ! -z "${{ secrets.ORG_GPG_PASSPHRASE }}" ] && | ||
[ ! -z "${{ secrets.ORG_GPG_PRIVATE_KEY }}" ] && | ||
[ ! -z "${{ secrets.ORG_OSSRH_USERNAME }}" ] && | ||
[ ! -z "${{ secrets.ORG_OSSRH_PASSWORD }}" ] && | ||
echo "HAS_OSSRH=true" >> $GITHUB_OUTPUT | ||
exit 0 | ||
publish-to-sonatype: | ||
name: "Publish artifacts to OSSRH Snapshots / MavenCentral" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
needs: [ secret-presence ] | ||
|
||
# do not run on PR branches, do not run on releases | ||
if: | | ||
needs.secret-presence.outputs.HAS_OSSRH && github.event_name != 'pull_request' && github.ref != 'refs/heads/releases' | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
- name: Cache maven packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Build with Maven | ||
run: mvn package -pl irs-testing,irs-models,irs-common,irs-edc-client,irs-registry-client --batch-mode | ||
|
||
# Import GPG Key | ||
- uses: ./.github/actions/import-gpg-key | ||
name: "Import GPG Key" | ||
with: | ||
gpg-private-key: ${{ secrets.ORG_GPG_PRIVATE_KEY }} | ||
|
||
- name: Configure Maven settings | ||
run: | | ||
mkdir -p $HOME/.m2 | ||
echo "<settings xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd'> | ||
<servers> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${{ secrets.ORG_OSSRH_USERNAME }}</username> | ||
<password>${{ secrets.ORG_OSSRH_PASSWORD }}</password> | ||
</server> | ||
</servers> | ||
</settings>" > $HOME/.m2/settings.xml | ||
- uses: ./.github/actions/setup-java | ||
# publish snapshots or releases | ||
- name: Publish version | ||
env: | ||
OSSRH_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }} | ||
OSSRH_USER: ${{ secrets.ORG_OSSRH_USERNAME }} | ||
run: |- | ||
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout -pl irs-registry-client) | ||
echo "Publishing Version $VERSION to Sonatype" | ||
mvn gpg:sign-and-deploy-file -Durl=https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ -DrepositoryId=ossrh -Dfile=irs-registry-client/target/irs-registry-client-$VERSION-jar-with-dependencies.jar -DgroupId=org.eclipse.tractusx.irs -DartifactId=irs-registry-client -Dversion=$VERSION -Dpackaging=jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.