Skip to content

Commit 7c74626

Browse files
committed
Merge branch 'epic/punchout' into feature/CXSPA-10011
2 parents 27ead4c + 5053c42 commit 7c74626

File tree

378 files changed

+23475
-17724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+23475
-17724
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/cache-builded-libs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
- develop
55
- develop-*
66
- 'epic/**'
7-
- release-*
7+
- release/*
88
name: Cache libs (dist)
99
jobs:
1010
cacheBuildedLibs:

.github/workflows/cache-node-modules.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
- develop
55
- develop-*
66
- 'epic/**'
7-
- release-*
7+
- release/*
88
name: Cache node modules
99

1010
env:

.github/workflows/ci-continuous-integration.yml

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- develop
66
- develop-*
7-
- release-*
7+
- release/*
88
- epic/**
99
workflow_dispatch:
1010
# empty as it is used only to manually trigger the workflow
@@ -87,8 +87,80 @@ jobs:
8787
- name: Run linting validation
8888
run: |
8989
ci-scripts/validate-lint.sh
90+
check_peer_dependencies:
91+
name: CI - Check peerDependencies
92+
runs-on: ubuntu-latest
93+
steps:
94+
- uses: actions/checkout@v4
95+
with:
96+
fetch-depth: 0
97+
- name: Setup node
98+
uses: actions/setup-node@v4
99+
with:
100+
node-version: ${{ env.NODE_VERSION }}
101+
- name: Run peerDependencies check
102+
run: |
103+
bash ci-scripts/check-peer-deps.sh ${{ github.event.pull_request.base.ref }}
104+
- name: Collect peer dependency changes
105+
id: collect-peer-deps
106+
run: |
107+
if [ -s peer-deps-result.txt ]; then
108+
echo "output<<EOF" >> $GITHUB_OUTPUT
109+
echo "### ❗ peerDependencies changes detected:" >> $GITHUB_OUTPUT
110+
cat peer-deps-result.txt >> $GITHUB_OUTPUT
111+
echo "EOF" >> $GITHUB_OUTPUT
112+
else
113+
echo "output=No peerDependencies changes detected" >> $GITHUB_OUTPUT
114+
fi
115+
- name: Post PR comment if peerDependencies changed
116+
if: failure() && github.event.pull_request
117+
uses: actions/github-script@v7
118+
with:
119+
github-token: ${{ secrets.GITHUB_TOKEN }}
120+
script: |
121+
const fs = require('fs');
122+
const path = 'peer-deps-result.txt';
123+
124+
if (!fs.existsSync(path)) {
125+
console.log("No peer-deps result file found. Skipping comment.");
126+
return;
127+
}
128+
129+
const diff = fs.readFileSync(path, 'utf8').trim();
130+
if (!diff) {
131+
console.log("peer-deps result file is empty. Skipping comment.");
132+
return;
133+
}
134+
135+
const issue_number = context.payload.pull_request.number;
136+
const owner = context.repo.owner;
137+
const repo = context.repo.repo;
138+
const botUser = context.actor;
139+
140+
const commentHeader = "🚨 **PeerDependencies Change Detected** 🚨";
141+
142+
const body = `
143+
${commentHeader}
144+
145+
Your pull request includes modifications to \`peerDependencies\` in the following file(s):
146+
147+
\`\`\`diff
148+
${diff}
149+
\`\`\`
150+
151+
Please note: Changes to peerDependencies are **restricted** and only permitted during **framework update releases**, as they may introduce breaking changes for customer's applications.
152+
If you believe this change is necessary, please reach out to the Asterix team for further assistance.
153+
`;
154+
155+
await github.rest.issues.createComment({
156+
issue_number,
157+
owner,
158+
repo,
159+
body
160+
});
161+
90162
ci_result:
91-
needs: [unit_tests, sonarqube_scan, linting]
163+
needs: [unit_tests, sonarqube_scan, linting, check_peer_dependencies]
92164
name: CI - Result
93165
runs-on: ubuntu-latest
94166
if: ${{ always() }}

.github/workflows/ci-merge-checks.yml

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- develop
66
- develop-*
7-
- release-*
7+
- release/*
88
workflow_dispatch:
99
# empty as it is used only to manually trigger the workflow
1010

@@ -13,6 +13,7 @@ env:
1313
GH_TOKEN: ${{ github.token }}
1414
NODE_VERSION: '20'
1515
CONTINUUM_REGISTRY_TOKEN: ${{ secrets.CONTINUUM_REGISTRY_TOKEN }}
16+
COMMON_SAP_ARTIFACTORY_TOKEN: ${{ secrets.COMMON_SAP_ARTIFACTORY_TOKEN }}
1617

1718
concurrency:
1819
group: ci-merge-checks-${{ github.head_ref || github.run_id }}
@@ -151,8 +152,44 @@ jobs:
151152
BUILD_NUMBER: ci-build-number-${{ github.event.pull_request.head.sha || github.run_id }}
152153
run: |
153154
ci-scripts/e2e-cypress.sh -s b2b
155+
a11y_e2e_tests:
156+
needs: [no_retries, validate_e2e_execution]
157+
name: MC - E2E A11Y
158+
runs-on: ubuntu-latest
159+
strategy:
160+
matrix:
161+
containers: [1, 2]
162+
if: ${{ needs.validate_e2e_execution.outputs.SHOULD_RUN_E2E == 'true' }}
163+
steps:
164+
- name: Forcefully fail build if e2e job is retried
165+
uses: actions/github-script@v7
166+
with:
167+
script: |
168+
core.setFailed('Please push a commit to trigger the build. To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`')
169+
if: ${{ github.run_attempt > 1 }}
170+
- uses: actions/checkout@v4
171+
- name: Setup node
172+
uses: actions/setup-node@v4
173+
with:
174+
node-version: ${{ env.NODE_VERSION }}
175+
- name: Cache node_modules
176+
id: cache-node-modules
177+
uses: actions/cache@v4
178+
with:
179+
path: |
180+
node_modules
181+
projects/storefrontapp-e2e-cypress/node_modules
182+
~/.cache/Cypress
183+
key: nodemodules-${{ github.event.pull_request.base.sha }}
184+
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
185+
- name: Run e2es
186+
env:
187+
SPA_ENV: ci
188+
BUILD_NUMBER: ci-build-number-${{ github.event.pull_request.head.sha || github.run_id }}
189+
run: |
190+
ci-scripts/e2e-cypress.sh -s a11y
154191
merge_checks_result:
155-
needs: [b2c_e2e_tests, b2c_ssr_e2e_tests, b2b_e2e_tests]
192+
needs: [b2c_e2e_tests, b2c_ssr_e2e_tests, b2b_e2e_tests, a11y_e2e_tests]
156193
name: MC - Result
157194
runs-on: ubuntu-latest
158195
if: ${{ always() }}
@@ -173,4 +210,5 @@ jobs:
173210
if: |
174211
needs.b2c_e2e_tests.result == 'failure' || needs.b2c_e2e_tests.result == 'cancelled' ||
175212
needs.b2c_ssr_e2e_tests.result == 'failure' || needs.b2c_ssr_e2e_tests.result == 'cancelled' ||
176-
needs.b2b_e2e_tests.result == 'failure' || needs.b2b_e2e_tests.result == 'cancelled'
213+
needs.b2b_e2e_tests.result == 'failure' || needs.b2b_e2e_tests.result == 'cancelled' ||
214+
needs.a11y_e2e_tests.result == 'failure' || needs.a11y_e2e_tests.result == 'cancelled'

.github/workflows/ci-pull-request-status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- develop
66
- develop-*
7-
- release-*
7+
- release/*
88
workflow_dispatch:
99
# empty as it is used only to manually trigger the workflow
1010

.github/workflows/ci.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ on:
33
branches:
44
- develop
55
- develop-*
6-
- release-*
6+
- release/*
77
workflow_dispatch:
88
# empty as it is used only to manually trigger the workflow
99

1010
env:
1111
CYPRESS_KEY: ${{ secrets.CYPRESS_KEY }}
1212
NODE_VERSION: '20'
1313
CONTINUUM_REGISTRY_TOKEN: ${{ secrets.CONTINUUM_REGISTRY_TOKEN }}
14+
COMMON_SAP_ARTIFACTORY_TOKEN: ${{ secrets.COMMON_SAP_ARTIFACTORY_TOKEN }}
1415

1516
concurrency:
1617
group: ci-${{ github.head_ref || github.run_id }}
@@ -217,6 +218,42 @@ jobs:
217218
BUILD_NUMBER: ci-build-number-${{ github.event.pull_request.head.sha || github.run_id }}
218219
run: |
219220
ci-scripts/e2e-cypress.sh -s b2b
221+
a11y_e2e_tests:
222+
needs: [no_retries, validate_e2e_execution]
223+
name: E2E tests for A11Y
224+
runs-on: ubuntu-latest
225+
strategy:
226+
matrix:
227+
containers: [1, 2]
228+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || needs.validate_e2e_execution.outputs.SHOULD_RUN_E2E == 'true' }}
229+
steps:
230+
- name: Forcefully fail build if e2e job is retried
231+
uses: actions/github-script@v7
232+
with:
233+
script: |
234+
core.setFailed('Please push a commit to trigger the build. To push an empty commit you can use `git commit --allow-empty -m "Trigger Build"`')
235+
if: ${{ github.run_attempt > 1 }}
236+
- uses: actions/checkout@v4
237+
- name: Setup node
238+
uses: actions/setup-node@v4
239+
with:
240+
node-version: ${{ env.NODE_VERSION }}
241+
- name: Cache node_modules
242+
id: cache-node-modules
243+
uses: actions/cache@v4
244+
with:
245+
path: |
246+
node_modules
247+
projects/storefrontapp-e2e-cypress/node_modules
248+
~/.cache/Cypress
249+
key: nodemodules-${{ github.event.pull_request.base.sha }}
250+
restore-keys: nodemodules-${{ github.event.pull_request.base.sha }}
251+
- name: Run e2es
252+
env:
253+
SPA_ENV: ci
254+
BUILD_NUMBER: ci-build-number-${{ github.event.pull_request.head.sha || github.run_id }}
255+
run: |
256+
ci-scripts/e2e-cypress.sh -s a11y
220257
ssr_tests:
221258
needs: [no_retries, validate_e2e_execution]
222259
name: SSR Tests

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ "develop", "develop*", "release-*", "epic/*"]
16+
branches: [ "develop", "develop*", "release/*", "epic/*"]
1717
pull_request:
18-
branches: [ "develop", "develop*", "release-*", "epic/*" ]
18+
branches: [ "develop", "develop*", "release/*", "epic/*" ]
1919
schedule:
2020
- cron: '45 2 * * *'
2121

.github/workflows/lighthouse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
branches:
55
- develop
66
- develop-*
7-
- release-*
7+
- release/*
88
workflow_dispatch:
99
# empty as it is used only to manually trigger the workflow
1010
env:

.github/workflows/minor-release.yml

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
name: Minor Release
1+
name: Release snapshot (creates a snapshot from the develop branch or from the input-provided source)
22

33
on:
44
workflow_dispatch:
55
inputs:
6+
source:
7+
description: 'Source to release from. Could be any branch or tag (e.g., release/2211.20.x, 2211.20.0). By default, the develop branch is used.'
8+
required: false
69
version:
710
description: 'Release version (e.g., 2211.20.0 or 2211.20.0-1)'
11+
required: true
12+
create_pr:
13+
description: 'Create a PR from the release branch to the source branch?'
814
required: false
9-
15+
type: 'boolean'
16+
default: false
1017
jobs:
1118
release:
1219
runs-on: ubuntu-latest
1320
steps:
1421
- name: Checkout code
1522
uses: actions/checkout@v4
1623
with:
17-
ref: develop
24+
ref: ${{ github.event.inputs.source || 'develop' }}
1825

1926
- name: Configure Git
2027
run: |
@@ -96,4 +103,50 @@ jobs:
96103
git add .
97104
git commit -m "Release ${{ env.version }}"
98105
git push origin "${{ env.RELEASE_BRANCH }}"
99-
106+
107+
- name: Tag the release
108+
run: |
109+
git fetch origin "${{ env.RELEASE_BRANCH }}"
110+
git checkout "${{ env.RELEASE_BRANCH }}"
111+
112+
TAG="${{ env.version }}"
113+
114+
# Check if tag already exists
115+
if git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; then
116+
echo "Tag $TAG already exists. Skipping creation."
117+
else
118+
git tag -a "$TAG" -m "$TAG"
119+
git push origin "$TAG"
120+
echo "Created and pushed tag: $TAG"
121+
fi
122+
123+
- name: Sync branch to a private repo
124+
env:
125+
GH_TOKEN: ${{ secrets.GH_PR_TOKEN }}
126+
run: |
127+
echo "Triggering repo-sync.yml with branch: ${{ env.RELEASE_BRANCH }}"
128+
129+
curl -X POST \
130+
-H "Accept: application/vnd.github+json" \
131+
-H "Authorization: Bearer $GH_TOKEN" \
132+
https://api.github.com/repos/${{ github.repository }}/actions/workflows/repo-sync.yml/dispatches \
133+
-d "{\"ref\":\"${{ env.RELEASE_BRANCH }}\",\"inputs\":{\"branch_to_sync\":\"${{ env.RELEASE_BRANCH }}\"}}"
134+
135+
- name: Create Pull Request to develop
136+
if: ${{ github.event.inputs.create_pr == 'true' }}
137+
env:
138+
GH_TOKEN: ${{ secrets.GH_PR_TOKEN }}
139+
run: |
140+
echo "Creating pull request from ${{ env.RELEASE_BRANCH }} to ${{ github.event.inputs.source }}..."
141+
142+
# Check if a PR already exists
143+
existing_pr=$(gh pr list --head "${{ env.RELEASE_BRANCH }}" --base "${{ github.event.inputs.source }}" --json number --jq '.[].number')
144+
if [[ -n "$existing_pr" ]]; then
145+
echo "PR already exists: #$existing_pr"
146+
else
147+
gh pr create \
148+
--head "${{ env.RELEASE_BRANCH }}" \
149+
--base "${{ github.event.inputs.source }}" \
150+
--title "chore(release): ${{ env.version }}" \
151+
--body "Automated PR to merge release changes back into the source branch."
152+
fi

0 commit comments

Comments
 (0)