diff --git a/.gitattributes b/.gitattributes index 44e8c58c..097f9f98 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,9 @@ -# Declare files that will always have LF line endings on checkout. -*.sh text eol=lf -gradlew text eol=lf +# +# https://help.github.com/articles/dealing-with-line-endings/ +# +# Linux start script should use lf +/gradlew text eol=lf + +# These are Windows script files and should use crlf +*.bat text eol=crlf + diff --git a/.github/actions/copy-maven-artifact/action.yml b/.github/actions/copy-maven-artifact/action.yml deleted file mode 100644 index d95bbce7..00000000 --- a/.github/actions/copy-maven-artifact/action.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: "Copy maven artifact" -description: "Copy a maven artifact from the maven repository to the current directory" - -inputs: - artifact: - description: 'Maven artifact to download.' - required: true - directory: - description: 'Path to a directory where the artifact should be saved.' - default: . - required: false - -runs: - using: "composite" - steps: - - name: 'Copy artifact' - # Run mvn with options to reduce download logs verbosity - run: mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn dependency:copy -Dartifact=${{ inputs.artifact }} -DoutputDirectory=${{ inputs.directory }} - shell: bash diff --git a/.github/actions/generate-key/action.yml b/.github/actions/generate-key/action.yml deleted file mode 100644 index 69d94258..00000000 --- a/.github/actions/generate-key/action.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: "Generate keys" -description: "Generate openssl public and private keys" - -inputs: - keyFileNamePrefix: - description: 'Prefix of the key file name.' - required: true - directory: - description: 'Path to a directory where the key should be saved.' - default: deployment/terraform/dataspace - required: false - -runs: - using: "composite" - steps: - - name: 'Generate key' - run: | - openssl ecparam -name prime256v1 -genkey -noout -out ${{ inputs.keyFileNamePrefix }}.pem - openssl ec -in ${{ inputs.keyFileNamePrefix }}.pem -pubout -out ${{ inputs.keyFileNamePrefix }}.public.pem - docker run -i danedmunds/pem-to-jwk:1.2.1 --public --pretty < ${{ inputs.keyFileNamePrefix }}.public.pem > ${{ inputs.keyFileNamePrefix }}.public.jwk - shell: bash - working-directory: ${{ inputs.directory }} \ No newline at end of file diff --git a/.github/actions/gradle-setup/action.yml b/.github/actions/gradle-setup/action.yml index 33165597..39c337a8 100644 --- a/.github/actions/gradle-setup/action.yml +++ b/.github/actions/gradle-setup/action.yml @@ -1,3 +1,22 @@ +# +# Copyright (c) 2024 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 Gradle" description: "Setup Gradle" runs: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 63192cfa..32b46ffd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,23 @@ +# +# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft +# +# 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 +# + +--- version: 2 updates: # maintain dependencies for GitHub actions @@ -14,8 +34,28 @@ updates: - package-ecosystem: "gradle" # checks build.gradle(.kts) and settings.gradle(.kts) directory: "/" schedule: - interval: "daily" + interval: "weekly" + open-pull-requests-limit: 5 + labels: + - "dependencies" + - "java" + ignore: + - dependency-name: "org.eclipse.edc:edc-versions" + + - package-ecosystem: "terraform" + directory: "/mxd" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + labels: + - "dependencies" + - "terraform" + + - package-ecosystem: "npm" + directory: "/edc-policy-playground" + schedule: + interval: "weekly" open-pull-requests-limit: 5 labels: - "dependencies" - - "java" \ No newline at end of file + - "npm" diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml deleted file mode 100644 index 3b54f48d..00000000 --- a/.github/workflows/cd.yaml +++ /dev/null @@ -1,80 +0,0 @@ -name: CD - -on: - workflow_dispatch: - push: - branches: - - main - paths-ignore: - - 'docs/**' - pull_request: - paths-ignore: - - 'docs/**' - -# MVD runs using docker compose based setup with no dependency on cloud services. - -jobs: - - VerifyLocalTests: - permissions: - checks: write - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: ./.github/actions/gradle-setup - - # Use EDC FileSystem vault for CI run. - - name: 'Build launcher' - run: ./gradlew -DuseFsVault="true" :launchers:connector:shadowJar - - # Build Registration Service runtime JAR locally. - - name: 'Build Registration Service launcher' - run: ./gradlew -DuseFsVault="true" :launchers:registrationservice:shadowJar - - # Download the CLI's into the test directory - - name: 'Copy Registration Service and IdentityHub CLI' - run: ./gradlew getJarsForLocalTest getJarsForAzureTest - - - name: 'Upgrade docker compose (for --wait option)' - run: | - sudo curl -L https://github.com/docker/compose/releases/download/v2.6.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose - sudo chmod +x /usr/local/bin/docker-compose - - - name: 'Run MVD docker compose (incl. MVD UI)' - run: docker compose --profile ui -f system-tests/docker-compose.yml up --build --wait - timeout-minutes: 10 - env: - REGISTRATION_SERVICE_LAUNCHER_PATH: ./launchers/registrationservice - MVD_UI_PATH: DataDashboard - - - name: 'Unit and system tests' - run: ./gradlew test -DincludeTags="ComponentTest,EndToEndTest" - timeout-minutes: 10 - env: - JACOCO: "true" - TEST_ENVIRONMENT: "local" - - - name: 'docker compose logs' - run: docker compose -f system-tests/docker-compose.yml logs - if: always() - env: - REGISTRATION_SERVICE_LAUNCHER_PATH: ./launchers/registrationservice - MVD_UI_PATH: DataDashboard - - - name: "Publish Gatling report" - uses: actions/upload-artifact@v4 - if: always() - with: - name: Gatling reports (local run) - path: '**/build/reports/gatling/**' - - - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v2 - if: always() - with: - files: "**/test-results/**/*.xml" - - - name: CodeCov - uses: codecov/codecov-action@v4 diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml deleted file mode 100644 index 7a0819bb..00000000 --- a/.github/workflows/check.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Checks - -on: - push: - branches: - - main - paths-ignore: - - 'docs/**' - pull_request: - paths-ignore: - - 'docs/**' - -jobs: - Checks: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/gradle-setup - - - name: Run Checkstyle - run: ./gradlew checkstyleMain checkstyleTest - - - name: Check Terraform files are properly formatted (run "terraform fmt -recursive" to fix) - run: | - terraform fmt -recursive - git diff --exit-code diff --git a/.github/workflows/cloud-cd.yaml b/.github/workflows/cloud-cd.yaml deleted file mode 100644 index 9121842d..00000000 --- a/.github/workflows/cloud-cd.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: CLOUD-CD - -on: - workflow_dispatch: - push: - branches: - - main - paths-ignore: - - 'docs/**' - - '**.md' - pull_request: - paths-ignore: - - 'docs/**' - - '**.md' - -# Grant permissions to obtain federated identity credentials -# see https://docs.github.com/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure -# Also grant permissions to publish test results -permissions: - id-token: write - contents: read - checks: write - pull-requests: write - -# Update this value with a unique name to guarantee uniqueness of resource names and avoid conflicts between fork repositories when running CD workflow. -# CD workflow creates resources with this prefix and destroy them. -env: - CD_RESOURCES_PREFIX: mvd - -jobs: - # The purpose of this job is only to set up resources_prefix as an output, because env context is not available in arguments to a called workflow - # See this discussion for more context: https://github.community/t/reusable-workflow-env-context-not-available-in-jobs-job-id-with/206111/13 - SetResourcesPrefix: - name: 'Set Resources Prefix' - runs-on: ubuntu-latest - # Added a step doing nothing, because a job needs to have at least one step. - steps: - - name: 'Set resources prefix' - run: | - # creates a random string consisting of 3 lower case characters - echo "CD_RESOURCES_PREFIX=$(tr -dc a-z > $GITHUB_ENV - - name: 'Test resources prefix' - run: echo $CD_RESOURCES_PREFIX - outputs: - resources_prefix: ${{ env.CD_RESOURCES_PREFIX }} #${{ github.run_number }} - - # Temporary step that checks if Azure secrets are set up. If not then the deploy of Azure resources will be skipped. Introduced to not fail checks in PRs from forks. - Check-Cloud-Environments: - name: 'Check if Azure secrets are set up' - runs-on: ubuntu-latest - steps: - - id: has-azure - env: - HAS_AZURE: ${{ secrets.ARM_SUBSCRIPTION_ID }} - if: "${{ env.HAS_AZURE != '' }}" - run: echo "defined=true" >> $GITHUB_OUTPUT - outputs: - has-azure: ${{ steps.has-azure.outputs.defined }} - - Deploy: - if: ${{ needs.Check-Cloud-Environments.outputs.has-azure == 'true' }} - uses: ./.github/workflows/run_azure_dataspace_tests.yaml - secrets: inherit - needs: - - SetResourcesPrefix - - Check-Cloud-Environments - with: - resources_prefix: ${{ needs.SetResourcesPrefix.outputs.resources_prefix }} \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 019b508f..0b7c7371 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,3 +1,22 @@ +# +# Copyright (c) 2024 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: "CodeQL" on: diff --git a/.github/workflows/discord-webhook.yml b/.github/workflows/discord-webhook.yml index 76f7e262..a367ca64 100644 --- a/.github/workflows/discord-webhook.yml +++ b/.github/workflows/discord-webhook.yml @@ -1,3 +1,22 @@ +# +# Copyright (c) 2024 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: 'Discord Webhook' on: issues: diff --git a/.github/workflows/initialize.yaml b/.github/workflows/initialize.yaml deleted file mode 100644 index 1c6c2176..00000000 --- a/.github/workflows/initialize.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Initialize CD - -on: workflow_dispatch - -# Grant permissions to obtain federated identity credentials -# see https://docs.github.com/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure -permissions: - id-token: write - contents: read - -jobs: - - Deploy: - runs-on: ubuntu-latest - - env: - COMMON_RESOURCE_GROUP: ${{ secrets.COMMON_RESOURCE_GROUP }} - COMMON_RESOURCE_GROUP_LOCATION: ${{ secrets.COMMON_RESOURCE_GROUP_LOCATION }} - TERRAFORM_STATE_STORAGE_ACCOUNT: ${{ secrets.TERRAFORM_STATE_STORAGE_ACCOUNT }} - TERRAFORM_STATE_CONTAINER: ${{ secrets.TERRAFORM_STATE_CONTAINER }} - steps: - - name: 'Az CLI login' - uses: azure/login@v2 - with: - client-id: ${{ secrets.ARM_CLIENT_ID }} - tenant-id: ${{ secrets.ARM_TENANT_ID }} - subscription-id: ${{ secrets.ARM_SUBSCRIPTION_ID }} - - - name: "Create resource group" - run: az group create --name "$COMMON_RESOURCE_GROUP" --location "$COMMON_RESOURCE_GROUP_LOCATION" -o table - - - name: "Create terraform state storage account and container" - run: | - az storage account create --name ${TERRAFORM_STATE_STORAGE_ACCOUNT} --resource-group ${COMMON_RESOURCE_GROUP} -o table - az storage container create --name ${TERRAFORM_STATE_CONTAINER} --account-name ${TERRAFORM_STATE_STORAGE_ACCOUNT} -o table \ No newline at end of file diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 4ce710e3..e286eb0d 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -1,3 +1,22 @@ +# +# Copyright (c) 2024 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: Scan Pull Request on: diff --git a/.github/workflows/run-terraform.yml b/.github/workflows/run-terraform.yml new file mode 100644 index 00000000..25b91a33 --- /dev/null +++ b/.github/workflows/run-terraform.yml @@ -0,0 +1,99 @@ +# +# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft +# +# 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: "Run DCP Demo locally" +on: + workflow_dispatch: + workflow_run: + workflows: [ "Verify" ] + types: + - completed + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + + +jobs: + Deploy-with-Terraform: + runs-on: ubuntu-latest + steps: + + - name: "Setup Helm" + uses: azure/setup-helm@v3.5 + with: + version: v3.8.1 + + - name: "Setup Kubectl" + uses: azure/setup-kubectl@v3.2 + + - uses: actions/checkout@v4 + + - uses: eclipse-edc/.github/.github/actions/setup-build@main + + - name: "Build runtime images" + working-directory: ./runtimes + run: | + ./gradlew -Ppersistence=true dockerize + + + - name: "Create k8s Kind Cluster" + uses: helm/kind-action@v1.8.0 + with: + config: deployment/kind.config.yaml + cluster_name: dcp-demo + + - name: "Load runtime images into KinD" + run: kind load docker-image connector:latest identity-hub:latest catalog-server:latest -n dcp-demo + + - name: "Install nginx ingress controller" + run: |- + echo "::notice title=nginx ingress on KinD::For details how to run nginx ingress on KinD check https://kind.sigs.k8s.io/docs/user/ingress/#ingress-nginx" + kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml + kubectl wait --namespace ingress-nginx \ + --for=condition=ready pod \ + --selector=app.kubernetes.io/component=controller \ + --timeout=90s + + + + - name: "Terraform init" + working-directory: ./deployment + run: |- + terraform init -reconfigure + - name: "Terraform plan" + working-directory: ./deployment + run: |- + terraform plan -out=$GITHUB_SHA.out + + - name: "Terraform apply" + working-directory: ./deployment + run: |- + terraform apply "$GITHUB_SHA.out" + + - name: "Run Health Checks" + run: |- + curl --fail http://localhost/provider-qna/health/check/readiness -H "x-api-key: password" + curl --fail http://localhost/provider-manufacturing/health/check/readiness -H "x-api-key: password" + curl --fail http://localhost/consumer/health/check/readiness -H "x-api-key: password" + + - name: "Destroy the KinD cluster" + run: >- + kind delete cluster -n dcp-demo \ No newline at end of file diff --git a/.github/workflows/run_azure_dataspace_tests.yaml b/.github/workflows/run_azure_dataspace_tests.yaml deleted file mode 100644 index d94a0bf5..00000000 --- a/.github/workflows/run_azure_dataspace_tests.yaml +++ /dev/null @@ -1,86 +0,0 @@ -name: Run Azure Dataspace Tests - -on: - workflow_call: - inputs: - resources_prefix: - description: 'Resources name prefix used to avoid naming conflicts between resources of different DataSpaces. Must be 3 to 7 lowercase letters and digits, starting with a letter.' - required: true - type: string - - workflow_dispatch: - inputs: - resources_prefix: - description: 'Resources name prefix used to avoid naming conflicts between resources of different DataSpaces. Must be 3 to 7 lowercase letters and digits, starting with a letter.' - required: true - type: string - -# Grant permissions to obtain federated identity credentials -# see https://docs.github.com/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure -permissions: - id-token: write - contents: read - checks: write - pull-requests: write - -env: - RESOURCES_PREFIX: ${{ github.event.inputs.resources_prefix || inputs.resources_prefix }} - APP_OBJECT_ID: ${{ secrets.APP_OBJECT_ID }} - APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }} - APP_CLIENT_SECRET: ${{ secrets.APP_CLIENT_SECRET }} - ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }} - ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} - ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} - ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} - COMMON_RESOURCE_GROUP: ${{ secrets.COMMON_RESOURCE_GROUP }} - TERRAFORM_STATE_CONTAINER: ${{ secrets.TERRAFORM_STATE_CONTAINER }} - TERRAFORM_STATE_STORAGE_ACCOUNT: ${{ secrets.TERRAFORM_STATE_STORAGE_ACCOUNT }} - -jobs: - Run-Azure-Dataspace-Tests: - runs-on: ubuntu-latest - - defaults: - run: - working-directory: deployment/azure - - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/gradle-setup - - - name: 'Copy IdentityHub and RegistrationService CLI JARs' - run: | - ./gradlew getJarsForLocalTest getJarsForAzureTest - working-directory: . - - - name: 'Build runtimes' - run: | - ./gradlew shadowJar - working-directory: . - - - name: 'Create dataspace with Terraform' - run: | - ./create_azure_dataspace.sh - az storage blob upload --overwrite -c $TERRAFORM_STATE_CONTAINER --account-name $TERRAFORM_STATE_STORAGE_ACCOUNT -f terraform/terraform.tfvars -n terraform.tfvars - - - name: 'Run dataspace in Docker' - run: | - docker compose -f docker/docker-compose.yml up --build --wait - - - name: 'Seed credentials and master data' - run: | - ./seed_dataspace.sh - - - name: 'Run all tests' - run: | - ./gradlew test -DincludeTags="EndToEndTest,ComponentTest" - working-directory: . - - - name: 'Destroy dataspace again' - run: | - ./shutdown_azure_dataspace.sh - - - name: 'Delete Terraform state' - run: | - az storage blob delete -c ${{ env.TERRAFORM_STATE_CONTAINER }} -n ${{ env.RESOURCES_PREFIX }} --account-name ${{ env.TERRAFORM_STATE_STORAGE_ACCOUNT }} - az storage blob delete -c ${{ env.TERRAFORM_STATE_CONTAINER }} -n terraform.tfvars --account-name ${{ env.TERRAFORM_STATE_STORAGE_ACCOUNT }} diff --git a/.github/workflows/triage-issue.yml b/.github/workflows/triage-issue.yml index aec1c09b..0d3b1392 100644 --- a/.github/workflows/triage-issue.yml +++ b/.github/workflows/triage-issue.yml @@ -1,3 +1,22 @@ +# +# Copyright (c) 2024 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: triage opened issue on: diff --git a/.github/workflows/verify.yaml b/.github/workflows/verify.yaml new file mode 100644 index 00000000..2644e0c8 --- /dev/null +++ b/.github/workflows/verify.yaml @@ -0,0 +1,65 @@ +# +# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft +# +# 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: "Verify" + +on: + push: + branches: + - main + pull_request: + branches: + - main + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + verify-license-headers: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: "Check for files without a license header" + run: |- + # checks all java, yaml, kts and sql files for an Apache 2.0 license header + cmd="grep -riL \"SPDX-License-Identifier: Apache-2.0\" --include=\*.{java,ts,html,css,yaml,yml,kts,sql,tf} --exclude-dir={.gradle,\*\openapi} ." + violations=$(eval $cmd | wc -l) + if [[ $violations -ne 0 ]] ; then + echo "$violations files without license headers were found:"; + eval $cmd; + exit 1; + fi + + validate-formating: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: eclipse-edc/.github/.github/actions/setup-build@main + - name: Run Checkstyle + run: ./gradlew checkstyleMain checkstyleTest + + - name: Check Terraform files are properly formatted (run "terraform fmt -recursive" to fix) + run: | + terraform fmt -recursive + git diff --exit-code \ No newline at end of file diff --git a/.gitignore b/.gitignore index ea30e0c0..cd8c54b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,80 +1,11 @@ -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -!gradle/wrapper/gradle-wrapper.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - # Ignore Gradle project-specific cache directory .gradle # Ignore Gradle build output directory build +out/ -.idea -.run -.vs -.vscode - -.DS_Store - -**/out -*.hprof - -.env - -# Terraform https://github.com/github/gitignore/blob/main/Terraform.gitignore - -**/.terraform/* - -# .tfstate files -*.tfstate -*.tfstate.* - -# Log files -*.log - -# Exclude all .tfvars files, which are likely to contain sensitive data, such as -# password, private keys, and other secrets. These should not be part of version -# control as they are data points which are potentially sensitive and subject -# to change depending on the environment. -*.tfvars -*.tfvars.json - -# Ignore override files as they are usually used to override resources locally and so -# are not checked in -override.tf -override.tf.json -*_override.tf -*_override.tf.json - -# Include override files you do wish to add to version control using negated pattern -# !example_override.tf - -# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan -# example: *tfplan* - -# Ignore CLI configuration files -.terraformrc -terraform.rc -**/.terraform.lock.hcl +.idea/ -deployment/azure/terraform/backend.conf +.terraform* +*terraform.tfstate* \ No newline at end of file diff --git a/.run/Connector Consumer Corp.run.xml b/.run/Connector Consumer Corp.run.xml new file mode 100644 index 00000000..68e02d71 --- /dev/null +++ b/.run/Connector Consumer Corp.run.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.run/Connector _provider-manufacturing_.run.xml b/.run/Connector _provider-manufacturing_.run.xml new file mode 100644 index 00000000..2defeb40 --- /dev/null +++ b/.run/Connector _provider-manufacturing_.run.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.run/Connector _provider-qna_.run.xml b/.run/Connector _provider-qna_.run.xml new file mode 100644 index 00000000..49d3aa41 --- /dev/null +++ b/.run/Connector _provider-qna_.run.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.run/IdentityHub Consumer Corp.run.xml b/.run/IdentityHub Consumer Corp.run.xml new file mode 100644 index 00000000..9b4db6ed --- /dev/null +++ b/.run/IdentityHub Consumer Corp.run.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.run/IdentityHub Provider Corp.run.xml b/.run/IdentityHub Provider Corp.run.xml new file mode 100644 index 00000000..058d3a91 --- /dev/null +++ b/.run/IdentityHub Provider Corp.run.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.run/Provider Catalog Server.run.xml b/.run/Provider Catalog Server.run.xml new file mode 100644 index 00000000..8c0eb23f --- /dev/null +++ b/.run/Provider Catalog Server.run.xml @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/.run/dataspace.run.xml b/.run/dataspace.run.xml new file mode 100644 index 00000000..a3eb24fd --- /dev/null +++ b/.run/dataspace.run.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.run/remote/Catalog Server PROVIDER.run.xml b/.run/remote/Catalog Server PROVIDER.run.xml new file mode 100644 index 00000000..42ec8dd1 --- /dev/null +++ b/.run/remote/Catalog Server PROVIDER.run.xml @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/.run/EDC company 2.run.xml b/.run/remote/Connector CONSUMER.run.xml similarity index 73% rename from .run/EDC company 2.run.xml rename to .run/remote/Connector CONSUMER.run.xml index 19d55312..c5638028 100644 --- a/.run/EDC company 2.run.xml +++ b/.run/remote/Connector CONSUMER.run.xml @@ -1,13 +1,13 @@ - +