Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/371 pi13 transfer to tractus x #685

Merged
merged 23 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3085658
feat(cucumber):[#371] Add cucumber feature files
ds-jhartmann Jun 7, 2024
0fdc967
feat(cucumber):[#371] Remove unused cucumber config and features
ds-jhartmann Jun 7, 2024
65b3544
feat(cucumber):[#371] Add missing license headers
ds-jhartmann Jun 7, 2024
0ced6ad
feat(workflows):[#371] refactor cucumber test workflows
ds-jhartmann Jun 7, 2024
079ce75
chore(config):[#371] move revision config to root pom
ds-jhartmann Jun 7, 2024
a0a5696
chore(dependencies):[#371] bump junit bom to 5.10.2, bump cucumber bo…
ds-jhartmann Jun 7, 2024
29a3e49
feat(maven):[#371] add maven profiles for cucumber tests and dash lic…
ds-jhartmann Jun 7, 2024
141e341
feat(docker):[#371] fix docker build
ds-jhartmann Jun 10, 2024
6b6175e
chore(deps):[#371] fix dash check command and update DEPENDENCIES
ds-jhartmann Jun 10, 2024
e71a237
chore(workflows):[#371] remove unused workflow
ds-jhartmann Jun 10, 2024
7c5e5d0
chore(docs):[#371] add cucumber reports badge to README
ds-jhartmann Jun 10, 2024
8dd2818
chore(cucumber):[#371] remove unused expected result files
ds-jhartmann Jun 10, 2024
846736b
feat(workflows):[#371] Add cucumber reporting via PR comment and arti…
ds-jhartmann Jun 10, 2024
273a773
feat(workflows):[#371] Switch tavern reporting to workflow
ds-jhartmann Jun 10, 2024
feb06e8
feat(workflows):[#371] revert renaming
ds-jhartmann Jun 10, 2024
ce7b7b2
feat(workflows):[#371] show cucumber report in workflow
ds-jhartmann Jun 10, 2024
5103486
chore(cucumber):[#371] update cucumber README
ds-jhartmann Jun 10, 2024
1dc8ddf
chore(workflows): remove outdated input
ds-jhartmann Jun 14, 2024
f47dc13
chore(workflows): rename to consistent scheme
ds-jhartmann Jun 14, 2024
67685ff
chore(deps):[#371] update DEPENDENCIES
ds-jhartmann Jun 14, 2024
f6f0625
chore(deps):[#371] update DEPENDENCIES
ds-jhartmann Jun 14, 2024
c9a7c1d
chore(deps):[#371] update DEPENDENCIES
ds-jhartmann Jun 14, 2024
47a57ff
chore(workflows): revert renaming
ds-jhartmann Jun 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 0 additions & 53 deletions .github/workflows/BETA-xray-cucumber-integration.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ concurrency:

jobs:
trigger-integration-test:
uses: ./.github/workflows/xray-cucumber-integration.yaml
uses: ./.github/workflows/cucumber-integration-test.yaml
secrets:
regularUserApiKey: ${{ secrets.DIL_REGULAR_USER_API_KEY }}
adminUserApiKey: ${{ secrets.DIL_ADMIN_USER_API_KEY }}
jiraUser: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
jiraPassword: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
cucumberPublishToken: ${{ secrets.IRS_CUCUMBER_PUBLISH_TOKEN }}
with:
executionFilter: "not @Ignore and @INTEGRATION_TEST and @DIL"
exportFilter: "11349"
executionFilter: "!Ignore & !INACTIVE & INTEGRATION_TEST & DIL"
20 changes: 20 additions & 0 deletions .github/workflows/cucumber-integration-test-INT.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: IRS INT Cucumber Integration test execution

on:
workflow_dispatch: # Trigger manually

# Cancel previous Test executions if a new one is triggered.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
trigger-integration-test:
uses: ./.github/workflows/cucumber-integration-test.yaml
secrets:
regularUserApiKey: ${{ secrets.INT_REGULAR_USER_API_KEY }}
adminUserApiKey: ${{ secrets.INT_ADMIN_USER_API_KEY }}
cucumberPublishToken: ${{ secrets.IRS_CUCUMBER_PUBLISH_TOKEN }}
with:
executionFilter: "!Ignore & !INACTIVE & INTEGRATION_TEST & INT"

82 changes: 82 additions & 0 deletions .github/workflows/cucumber-integration-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: IRS Cucumber Integration Test execution

on:
workflow_call: # Trigger by another workflow
secrets:
regularUserApiKey:
required: true
adminUserApiKey:
required: true
cucumberPublishToken:
required: true
inputs:
executionFilter:
required: true
type: string

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Cache maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Run Tests with Maven
env:
REGULAR_USER_API_KEY: ${{ secrets.regularUserApiKey }}
ADMIN_USER_API_KEY: ${{ secrets.adminUserApiKey }}
ISSUE_FILTER: ${{ inputs.executionFilter }}
CUCUMBER_PUBLISH_TOKEN: ${{ secrets.cucumberPublishToken }}
run: mvn clean verify -P cucumber -Dgroups="$ISSUE_FILTER" -pl irs-cucumber-tests -am --batch-mode 2> irs-cucumber-tests/report-banner.txt

- name: Publish Cucumber Results
uses: EnricoMi/[email protected]
Dismissed Show dismissed Hide dismissed
if: always()
with:
files: |
irs-cucumber-tests/target/cucumber-junit-report.xml

- name: Get Cucumber Report
if: always()
id: get-cucumber-report
run: |
grep -E "^│.*│$" irs-cucumber-tests/report-banner.txt > irs-cucumber-tests/cucumber-report.txt
sed -i 's/│//g' irs-cucumber-tests/cucumber-report.txt
cat irs-cucumber-tests/cucumber-report.txt

- name: Find previous comment in PR
if: always() && github.event_name == 'pull_request'
uses: peter-evans/find-comment@v3
Dismissed Show dismissed Hide dismissed
id: find-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: 'View your Cucumber Report at'

- name: Create or update comment in PR
if: always() && github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@v4
Dismissed Show dismissed Hide dismissed
with:
comment-id: ${{ steps.find-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-path: 'irs-cucumber-tests/cucumber-report.txt'
edit-mode: replace

- name: Upload Report
if: always()
uses: actions/upload-artifact@v4
with:
path: 'irs-cucumber-tests/target/report.html'
12 changes: 7 additions & 5 deletions .github/workflows/eclipse-dash.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ name: "Eclipse DASH IP Check"
on:
workflow_dispatch: # Trigger manually
push:
branches: main
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.txt'
pull_request:
branches: main
branches:
- main
paths:
- '**/pom.xml'
- 'pom.xml'
Expand All @@ -34,13 +36,13 @@ jobs:

- name: Build with Maven and check dependencies with dash
run: |
mvn --batch-mode --update-snapshots verify -Ddash.fail=true -DskipTests
mvn --batch-mode --update-snapshots verify -P dash

- name: Ensure DEPENDENCIES file is reflecting the current state
run: |
mvn org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES-gen
mvn org.eclipse.dash:license-tool-plugin:license-check -Ddash.summary=DEPENDENCIES-gen -P dash
diff DEPENDENCIES DEPENDENCIES-gen


- name: upload results
if: always()
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/integration-test-DEV.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ concurrency:

jobs:
trigger-integration-test:
uses: ./.github/workflows/xray-cucumber-integration.yaml
uses: ./.github/workflows/cucumber-integration-test.yaml
secrets:
regularUserApiKey: ${{ secrets.DEV_REGULAR_USER_API_KEY }}
adminUserApiKey: ${{ secrets.DEV_ADMIN_USER_API_KEY }}
jiraUser: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
jiraPassword: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
cucumberPublishToken: ${{ secrets.IRS_CUCUMBER_PUBLISH_TOKEN }}
with:
executionFilter: "not @Ignore and @INTEGRATION_TEST and @DEV"
exportFilter: "11349"
executionFilter: "!Ignore & !INACTIVE & INTEGRATION_TEST & DEV"
17 changes: 0 additions & 17 deletions .github/workflows/integration-test-INT.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/synch-env-branch.yml

This file was deleted.

23 changes: 8 additions & 15 deletions .github/workflows/tavern-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ on:
description: BPN to use for the asBuilt global-asset-id.
default: 'BPNL00000003AYRE'
required: true
execution-ticket:
type: string
description: JIRA execution ticket to safe results in.
default: 'TRI-1531'
required: true

jobs:
test:
Expand Down Expand Up @@ -70,16 +65,14 @@ jobs:
run: |
python -m pytest local/testing/api-tests/irs-api-tests.tavern.yaml --junitxml=tavern-results.xml

- name: Upload results
- name: Mask credentials
if: always()
env:
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
TEST_EXECUTION_TICKET: ${{ github.event.inputs.execution-ticket || 'TRI-1531' }}
# Remove tokens and upload the tavern results to JIRA Test execution
run: |
sed "s/access_tok.*:s = '.*'//g" tavern-results.xml | sed "s/Authorization: Bearer .*/Authorization:/g" | uniq > result.xml
curl -H "Content-Type: multipart/form-data" \
-u $JIRA_USERNAME:$JIRA_PASSWORD \
-F '[email protected]' \
"https://jira.catena-x.net/rest/raven/1.0/import/execution/junit?testExecKey=$TEST_EXECUTION_TICKET"

- name: Publish Tavern Results
uses: EnricoMi/[email protected]
Dismissed Show dismissed Hide dismissed
if: always()
with:
files: |
result.xml
24 changes: 9 additions & 15 deletions .github/workflows/tavern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,7 @@ on:
description: Incident BPN to search for which violates against environmental and social standards.
default: 'BPNS00000003B6LU'
required: true
execution-ticket:
type: string
description: JIRA execution ticket to safe results in.
default: 'TRI-910'
required: true

schedule:
- cron: '0 1 * * 1-5' # At 01:00 on every day-of-week from Monday through Friday.

Expand Down Expand Up @@ -92,16 +88,14 @@ jobs:
run: |
python -m pytest local/testing/api-tests/irs-api-tests.tavern.yaml --junitxml=tavern-results.xml

- name: Upload results
- name: Mask credentials
if: always()
env:
JIRA_USERNAME: ${{ secrets.ORG_IRS_JIRA_USERNAME }}
JIRA_PASSWORD: ${{ secrets.ORG_IRS_JIRA_PASSWORD }}
TEST_EXECUTION_TICKET: ${{ github.event.inputs.execution-ticket || 'TRI-910' }}
# Remove tokens and upload the tavern results to JIRA Test execution
run: |
sed "s/access_tok.*:s = '.*'//g" tavern-results.xml | sed "s/Authorization: Bearer .*/Authorization:/g" | uniq > result.xml
curl -H "Content-Type: multipart/form-data" \
-u $JIRA_USERNAME:$JIRA_PASSWORD \
-F '[email protected]' \
"https://jira.catena-x.net/rest/raven/1.0/import/execution/junit?testExecKey=$TEST_EXECUTION_TICKET"

- name: Publish Tavern Results
uses: EnricoMi/[email protected]
Dismissed Show dismissed Hide dismissed
if: always()
with:
files: |
result.xml
Loading
Loading