Skip to content

Commit

Permalink
refactor: move GCP-specific code from other components here
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jun 1, 2023
1 parent 4a34ffe commit 75d40e4
Show file tree
Hide file tree
Showing 71 changed files with 7,795 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/adoption_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
name: Adoption Request
about: Submit your feature to the project
title: 'Adoption Request'
labels: 'adoption'
assignees: ''

---

# Adoption Request

_Thank you for wanting to contribute to the project! We are very happy to see the functionalities of the EDC being extended. Providing this open-source is a great opportunity for others with similar requirements and to avoid additional work._

_For any details about the guidelines for submitting features, please take a look at the [contribution categories](https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/blob/main/contribution_categories.md)._


## General information

Please provide some information about your project or code contribution.

_If you choose to be referenced as a "friend", these will be added to the [known friends list](https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/blob/main/known_friends.md)._
_If you choose to add your feature as a core EDC component, links to your current code and correlated issues, discussions, and pull requests are of great importance._

| Title | Description | Contact | Links
| :--- | :--- | :--- | :---
| _My awesome project_ | _This is an example._ | _e-mail-address_ | _link to repository, homepage, discussion, etc._


## Adoption level

Next, please tell us what level of adoption you intend to provide. _(pick only one)_

- [ ] Reference a feature as "friend"
- [ ] Incorporate a feature as core EDC component



## Adoption in EDC core

_If you chose to add your feature as a core EDC component, please answer the following questions._

### Why should this contribution be adopted?
_Please argue why this feature must be hosted upstream and be maintained by the EDC core team._

### Could it be achieved with existing functionality? If not, why?
_If there is any existing code that can achieve the same thing with little modification, that is usually the preferable way for the EDC core team. We aim to keep the code succinct and want to avoid similar/duplicate code. Make sure you understand the EDC code base well!_

### Are there multiple use cases or applications who will benefit from the contribution?
_Basically, we want you to motivate who will use that feature and why, thereby arguing the fact that it is well-suited to be adopted in the core code base. One-off features are better suited to be maintained externally._

### Can it be achieved without introducing third-party dependencies? If not, which ones?
_EDC is a platform rather than an application, therefore we are extremely careful when it comes to introducing third party libraries. The reasons are diverse: security, license issues and over all JAR weight, just to mention a few important ones._

### Would this feature limit platform independence in any way? If so, how and why?
_Features that do not work well in clustered environments are difficult to adopt, since EDC is designed from the ground up to be stateless and clusterable. Similarly, features, that have dependencies onto certain operating systems are difficult to argue._

### Is it going to be a self-contained feature, or would it cut across the entire code base?
_Features that have a large impact on the code base are very complex to thoroughly test, they have a high chance to destabilize the code and require careful inspection. Self-contained features on the other hand are easier to isolate and test._
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug Report
about: Create a report to help us improve
title: ''
labels: 'bug'
assignees: ''

---

# Bug Report

## Describe the Bug
_A clear and concise description of the bug._

### Expected Behavior
_A clear and concise description of what you expected to happen._

### Observed Behavior
_A clear and concise description of what happened instead._

## Steps to Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

## Context Information
_Add any other context about the problem here._

- Used version [e.g. EDC v1.0.0]
- OS: [e.g. iOS, Windows]
- ...

## Detailed Description
_If applicable, add screenshots and logs to help explain your problem._

## Possible Implementation
_You already know the root cause of the erroneous state and how to fix it? Feel free to share your thoughts._
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
blank_issues_enabled: false
contact_links:
- name: Open up a blank issue
url: https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/issues/new
about: Don’t see your issue here? Open up a blank one
- name: Ask a question or get support
url: https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/discussions/categories/q-a
about: Ask a question or request support for using the Eclipse Dataspace Connector
- name: Take a look at the documentation
url: https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/tree/main/docs
about: Browse the documentation for more information
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature Request
about: Help us with new ideas
title: ''
labels: ''
assignees: ''

---

# Feature Request

_If you are missing a feature or have an idea how to improve this project that should first be discussed, please feel free to open up a [discussion](https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/discussions/categories/ideas)._

## Which Areas Would Be Affected?
_e.g., DPF, CI, build, transfer, etc._

## Why Is the Feature Desired?
_Are there any requirements?_

## Solution Proposal
_If possible, provide a (brief!) solution proposal._
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## What this PR changes/adds

_Briefly describe WHAT your pr changes, which features it adds/modifies._

## Why it does that

_Briefly state why the change was necessary._

## Further notes

_List other areas of code that have changed but are not necessarily linked to the main feature. This could be method signature changes, package declarations, bugs that were encountered and were fixed inline, etc._

## Linked Issue(s)

Closes # <-- _insert Issue number if one exists_
42 changes: 42 additions & 0 deletions .github/actions/bump-version/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Bump version in gradle.properties"
description: "Increments the patch version of the version found in gradle.properties, appends -SNAPSHOT"
inputs:
target_branch:
default: 'main'
description: "Branch on which the version bump is to be done."
required: false

runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- name: read version from gradle.properties
shell: bash
run: |
# Prepare git env
git config user.name "eclipse-edc-bot"
git config user.email "edc-bot@eclipse.org"
# checkout target
git fetch origin
git checkout ${{ inputs.target_branch }}
# determine current version
oldVersion=$(grep "version" gradle.properties | awk -F= '{print $2}')
# read the major, minor, and patch components, consume -SNAPSHOT
IFS=.- read -r RELEASE_VERSION_MAJOR RELEASE_VERSION_MINOR RELEASE_VERSION_PATCH SNAPSHOT<<<"$oldVersion"
# construct the new version
newVersion="$RELEASE_VERSION_MAJOR.$RELEASE_VERSION_MINOR.$((RELEASE_VERSION_PATCH+1))"-SNAPSHOT
# replace every occurrence of =$oldVersion with =$newVersion
grep -rlz "$oldVersion" . --exclude=\*.{sh,bin} | xargs sed -i "s/$oldVersion/$newVersion/g"
echo "Bumped the version from $oldVersion to $newVersion"
# Commit and push to the desired branch, defaults to 'main'
git add .
git commit --message "Bump version from $oldVersion to $newVersion [skip ci]"
git push origin ${{ inputs.target_branch }}
21 changes: 21 additions & 0 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Run tests"
description: "Run tests and archive test results for subsequent publication"
inputs:
command:
required: true
description: "The shell command to run tests"
runs:
using: "composite"
steps:
- name: Run Tests
shell: bash
run: ${{ inputs.command }}

- name: Upload Test Results
uses: actions/upload-artifact@v3
if: always()
with:
name: Test Results ${{ github.job }}
path: |
**/test-results/**/*.xml
**/build/reports/jacoco/test/jacocoTestReport.xml
12 changes: 12 additions & 0 deletions .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Setup Gradle"
description: "Setup Gradle"
runs:
using: "composite"
steps:
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Gradle cache
uses: gradle/gradle-build-action@v2
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: 2
updates:
# maintain dependencies for GitHub actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly" # default = monday
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github_actions"

# maintain dependencies for Gradle
- package-ecosystem: "gradle" # checks build.gradle(.kts) and settings.gradle(.kts)
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "java"
ignore:
- dependency-name: "org.eclipse.edc:edc-versions"

18 changes: 18 additions & 0 deletions .github/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file determines how the auto-generated Release Notes in GitHub releases are structured.

changelog:
exclude:
labels:
- no-changelog
authors:
- dependabot[bot]
categories:
- title: Bugfixes
labels:
- bug
- title: New Features & Improvements
labels:
- "*"
- title: Documentation
labels:
- documentation
67 changes: 67 additions & 0 deletions .github/workflows/close-inactive-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Close Inactive Issues
on:
schedule:
- cron: "30 1 * * *" # once a day (1:30 UTC)
workflow_dispatch: # allow manual trigger

jobs:
close-issues-with-assignee:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/stale@v8
with:
operations-per-run: 1000
days-before-issue-stale: 28
days-before-issue-close: 7
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 28 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
close-issue-reason: 'not_planned'
days-before-pr-stale: -1 # ignore PRs (overwrite default days-before-stale)
days-before-pr-close: -1 # ignore PRs (overwrite default days-before-close)
remove-issue-stale-when-updated: true
exempt-all-issue-milestones: true # issues with assigned milestones will be ignored
exempt-issue-labels: bug # ignore issues labelled as bug
repo-token: ${{ secrets.GITHUB_TOKEN }}

close-issues-without-assignee:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/stale@v8
with:
operations-per-run: 1000
days-before-issue-stale: 14
days-before-issue-close: 7
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 14 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
close-issue-reason: 'not_planned'
days-before-pr-stale: -1 # ignore PRs (overwrite default days-before-stale)
days-before-pr-close: -1 # ignore PRs (overwrite default days-before-close)
remove-issue-stale-when-updated: true
exempt-all-issue-milestones: true # issues with assigned milestones will be ignored
exempt-all-issue-assignees: true # issues with assignees will be ignored
exempt-issue-labels: bug # ignore issues labelled as bug
repo-token: ${{ secrets.GITHUB_TOKEN }}

close-inactive-pull-requests:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/stale@v8
with:
operations-per-run: 1000
days-before-issue-stale: -1 # ignore issues (overwrite default days-before-stale)
days-before-issue-close: -1 # ignore issues (overwrite default days-before-close)
stale-pr-label: "stale"
stale-pr-message: "This pull request is stale because it has been open for 7 days with no activity."
close-pr-message: "This pull request was closed because it has been inactive for 7 days since being marked as stale."
days-before-pr-stale: 7
days-before-pr-close: 7
remove-pr-stale-when-updated: true
repo-token: ${{ secrets.GITHUB_TOKEN }}
50 changes: 50 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "CodeQL"

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-build

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Compiles production Java source (without tests)
- name: Build
run: ./gradlew compileJava --no-daemon

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Loading

0 comments on commit 75d40e4

Please sign in to comment.