Skip to content

Commit

Permalink
Merge pull request #320 from eclipse-tractusx/develop
Browse files Browse the repository at this point in the history
feat: main release
  • Loading branch information
borisrizov-zf authored Jul 3, 2024
2 parents f4f93eb + 31cbb74 commit d261f37
Show file tree
Hide file tree
Showing 177 changed files with 12,572 additions and 6,792 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
# ********************************************************************************/

**/.git
build/test-results
miw/build/test-results
11 changes: 7 additions & 4 deletions .github/workflows/app-test-coverage-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ jobs:
fetch-depth: 0

- name: Set up Java 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2

- name: Test app
run: ./gradlew test

Expand All @@ -48,18 +51,18 @@ jobs:
run: ./gradlew jacocoTestReport

- name: Upload test results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results
path: ${{ github.workspace }}/build/
path: ${{ github.workspace }}/miw/build/

- name: Publish code coverage report as PR comment
uses: madrapps/[email protected]
if: always()
with:
paths: |
${{ github.workspace }}/build/reports/xml/jacoco.xml
${{ github.workspace }}/miw/build/reports/xml/jacoco.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 80
min-coverage-changed-files: 80
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/app-test-coverage-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

steps:
- name: Download test results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test-results
path: ${{ github.workspace }}/
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/chart-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4.1.0
with:
version: v3.12.3

Expand Down Expand Up @@ -86,8 +86,8 @@ jobs:
uses: addnab/docker-run-action@v3
with:
image: jnorwood/helm-docs:v1.11.3
options: -v ${{ github.workspace }}/charts:/helm-docs
run: helm-docs -i managed-identity-wallet/.helmdocsignore
options: -v ${{ github.workspace }}/charts:/helm-docs -v ${{ github.workspace }}/.helmdocsignore:/helm-docs/.helmdocsignore
run: helm-docs

- name: Verify that no changes are required
run: |
Expand All @@ -108,14 +108,14 @@ jobs:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4.1.0
with:
version: v3.12.3

- name: Set up Taskfile
uses: arduino/setup-task@v1

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
version: v0.20.0

- name: Build image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/dast-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ jobs:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@v4.1.0
with:
version: v3.12.3

- name: Set up Taskfile
uses: arduino/setup-task@v1

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
Expand All @@ -72,7 +72,7 @@ jobs:
version: v0.20.0

- name: Build image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down Expand Up @@ -120,15 +120,10 @@ jobs:
echo "... done."
- name: Add Summary
if: success() || failure()
run: |
echo "Publishing Job summary... "
cat report_md.md >> $GITHUB_STEP_SUMMARY
- name: Upload HTML report
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ZAP scan report
path: ./report_html.html
retention-days: 1
42 changes: 25 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2

- name: Setup Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
uses: azure/[email protected]

- name: Setup JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down Expand Up @@ -94,15 +95,15 @@ jobs:
run: ./gradlew build

- name: Upload build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build
path: ./build
path: ./miw/build
if-no-files-found: error
retention-days: 1

- name: Upload Helm chart artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: charts
path: ./charts
Expand All @@ -114,6 +115,15 @@ jobs:
echo "::notice::${{ env.next_release }}"
echo "::notice::${{ env.will_create_new_release }}"
- name: Upload jar to GitHub release
if: github.event_name != 'pull_request' && steps.semantic-release.outputs.will_create_new_release == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_VERSION: ${{ steps.semantic-release.outputs.next_release }}
run: |
echo "::notice::Uploading jar to GitHub release"
gh release upload "v$RELEASE_VERSION" ./miw/build/libs/miw-latest.jar
docker:
name: Docker Release
needs: semantic_release
Expand All @@ -122,21 +132,21 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: build
path: ./build
path: ./miw/build

- name: Download Helm chart artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: charts
path: ./charts

# Create SemVer or ref tags dependent of trigger event
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_NAMESPACE }}/${{ env.IMAGE_NAME }}
Expand All @@ -152,14 +162,14 @@ jobs:
- name: DockerHub login
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
# Use existing DockerHub credentials present as secrets
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Push image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
Expand Down Expand Up @@ -189,15 +199,13 @@ jobs:
uses: actions/checkout@v4

- name: Download Helm chart artifact
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: charts
path: ./charts

- name: Install Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
uses: azure/[email protected]

- name: Add Helm dependency repositories
run: |
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/veracode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v2

- uses: madhead/read-java-properties@latest
id: version
with:
Expand All @@ -48,20 +51,20 @@ jobs:
- name: Set outputs
id: vars
run: |
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "{sha_short}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Show version
run: echo ${APP_VERSION}.${SHORT_SHA}

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
uses: gradle/gradle-build-action@2.4.2
with:
arguments: build

Expand All @@ -71,6 +74,6 @@ jobs:
with:
appname: 'project-managed-identity-wallet'
createprofile: false
filepath: 'build/libs/miw-latest.jar' # add filepath for upload
filepath: 'miw/build/libs/miw-latest.jar' # add filepath for upload
vid: '${{ secrets.ORG_VERACODE_API_ID }}' # reference to API ID, which is set as github org. secret
vkey: '${{ secrets.ORG_VERACODE_API_KEY }}' #reference to API Key in github, which is set as github or. secret
File renamed without changes.
4 changes: 2 additions & 2 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
[
"@semantic-release/exec",
{
"prepareCmd": "cd charts/managed-identity-wallet && helm-docs -i .helmdocsignore ."
"prepareCmd": "cd charts/managed-identity-wallet && helm-docs ."
}
],
"@semantic-release/release-notes-generator",
Expand All @@ -56,7 +56,7 @@
{
"assets": [
"CHANGELOG.md",
"DEPENDENCIES",
"miw/DEPENDENCIES",
"gradle.properties",
"./charts/managed-identity-wallet/Chart.yaml",
"./charts/managed-identity-wallet/README.md"
Expand Down
Loading

0 comments on commit d261f37

Please sign in to comment.