Skip to content

Commit a46d145

Browse files
committed
WIP
1 parent c97729e commit a46d145

File tree

5 files changed

+88
-11
lines changed

5 files changed

+88
-11
lines changed

.github/actions/check_if_latest_release/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ runs:
1818
1919
if [ "$LATEST_TAG_NAME" == "$RELEASE_EVENT_TAG_NAME" ]; then
2020
echo "We are releasing the latest tag. Continuing deployment workflow."
21+
echo "IS_LATEST_RELEASE=true" >> $GITHUB_ENV
2122
exit 0
2223
else
2324
echo "We are not releasing the latest tag. Stopping deployment workflow."
24-
exit 1
25+
exit 0
2526
fi
2627
shell: bash

.github/workflows/deploy_latest_release.yml

Lines changed: 51 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,49 @@ jobs:
2020
with:
2121
token: ${{ secrets.GITHUB_TOKEN }}
2222

23-
deploy-bug-bounty:
23+
# Re-enable this when the PR is ready to be merged
24+
# deploy-bug-bounty:
25+
# if: env.IS_LATEST_RELEASE == 'true'
26+
# needs: check-latest-release
27+
# runs-on: ubuntu-latest
28+
# steps:
29+
# - name: Checkout
30+
# uses: actions/checkout@v4
31+
32+
# - name: Setup node
33+
# id: setup_node
34+
# uses: actions/setup-node@v4
35+
# with:
36+
# node-version: 22
37+
# cache: "npm"
38+
39+
# - name: Install Monorepo Dependencies
40+
# run: |-
41+
# # Install node dependencies
42+
# node ./scripts/gtime.js monorepo_install npm ci
43+
44+
# - name: Generate Retail App Demo
45+
# uses: ./.github/actions/e2e_generate_app
46+
# with:
47+
# PROJECT_KEY: "retail-react-app-bug-bounty"
48+
49+
# - name: Create MRT credentials file
50+
# uses: "./.github/actions/create_mrt"
51+
# with:
52+
# mobify_user: ${{ secrets.MOBIFY_STG_CLIENT_USER }}
53+
# mobify_api_key: ${{ secrets.MOBIFY_STG_CLIENT_API_KEY }}
54+
55+
# - name: Push Bundle to MRT (Bug Bounty)
56+
# uses: "./.github/actions/push_to_mrt"
57+
# with:
58+
# CWD: "../generated-projects/retail-react-app-bug-bounty"
59+
# TARGET: testing
60+
# PROJECT: pwa-kit
61+
# MESSAGE: "tag ${{ github.event.release.tag_name }}"
62+
# FLAGS: --cloud-origin https://cloud-testing.mobify-staging.com -c ~/.mobify --wait
63+
64+
deploy-demo-site:
65+
if: env.IS_LATEST_RELEASE == 'true'
2466
needs: check-latest-release
2567
runs-on: ubuntu-latest
2668
steps:
@@ -42,19 +84,19 @@ jobs:
4284
- name: Generate Retail App Demo
4385
uses: ./.github/actions/e2e_generate_app
4486
with:
45-
PROJECT_KEY: "retail-react-app-bug-bounty"
87+
PROJECT_KEY: "retail-react-app-demo-site"
4688

4789
- name: Create MRT credentials file
4890
uses: "./.github/actions/create_mrt"
4991
with:
50-
mobify_user: ${{ secrets.MOBIFY_STG_CLIENT_USER }}
51-
mobify_api_key: ${{ secrets.MOBIFY_STG_CLIENT_API_KEY }}
92+
mobify_user: ${{ secrets.MOBIFY_CLIENT_USER }}
93+
mobify_api_key: ${{ secrets.MOBIFY_CLIENT_API_KEY }}
5294

53-
- name: Push Bundle to MRT (Bug Bounty)
95+
- name: Push Bundle to MRT (Demo Site)
5496
uses: "./.github/actions/push_to_mrt"
5597
with:
56-
CWD: "../generated-projects/retail-react-app-bug-bounty"
57-
TARGET: testing
58-
PROJECT: pwa-kit
98+
CWD: "../generated-projects/retail-react-app-demo-site"
99+
TARGET: production
100+
PROJECT: scaffold-pwa
59101
MESSAGE: "tag ${{ github.event.release.tag_name }}"
60-
FLAGS: --cloud-origin https://cloud-testing.mobify-staging.com -c ~/.mobify --wait
102+
FLAGS: --wait

e2e/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,12 @@ module.exports = {
102102
],
103103
"retail-app-private-client": [],
104104
"retail-react-app-bug-bounty": [],
105+
"retail-react-app-demo-site": [],
105106
},
106107
PRESET: {
107108
"retail-app-private-client": "retail-react-app-private-slas-client",
108109
"retail-react-app-bug-bounty": "retail-react-app-bug-bounty",
110+
"retail-react-app-demo-site": "retail-react-app-demo-private"
109111
},
110112
EXPECTED_GENERATED_ARTIFACTS: {
111113
"retail-app-demo": [

e2e/scripts/generate-project.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ program
6363
'retail-app-ext',
6464
'retail-app-no-ext',
6565
'retail-app-private-client',
66-
'retail-react-app-bug-bounty'
66+
'retail-react-app-bug-bounty',
67+
'retail-react-app-demo-site'
6768
]
6869
if (!validKeys.includes(value)) {
6970
throw new Error('Invalid project key.')

packages/pwa-kit-create-app/scripts/create-mobify-app.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,37 @@ const PRESETS = [
270270
assets: ['translations'],
271271
private: false
272272
},
273+
{
274+
id: 'retail-react-app-demo-private',
275+
name: 'Retail React App Demo Private Client',
276+
description: `
277+
Generates a project using the settings for a special B2C Commerce
278+
instance that is used for demo purposes and sets it up with a private SLAS client.
279+
280+
This has social and passwordless login enabled but requires a client secret to run.
281+
`,
282+
shortDescription: 'The Retail app with demo Commerce Cloud instance and a private SLAS client',
283+
templateSource: {
284+
type: TEMPLATE_SOURCE_NPM,
285+
id: '@salesforce/retail-react-app'
286+
},
287+
questions: [...EXTENSIBILITY_QUESTIONS, ...RETAIL_REACT_APP_QUESTIONS],
288+
answers: {
289+
['project.extend']: true,
290+
['project.hybrid']: false,
291+
['project.name']: 'demo-storefront',
292+
['project.commerce.instanceUrl']: 'https://zzte-053.dx.commercecloud.salesforce.com',
293+
['project.commerce.clientId']: '',
294+
['project.commerce.siteId']: 'RefArch',
295+
['project.commerce.organizationId']: 'f_ecom_zzte_053',
296+
['project.commerce.shortCode']: 'kv7kzm78',
297+
['project.commerce.isSlasPrivate']: false,
298+
['project.einstein.clientId']: '1ea06c6e-c936-4324-bcf0-fada93f83bb1',
299+
['project.einstein.siteId']: 'aaij-MobileFirst'
300+
},
301+
assets: ['translations'],
302+
private: true
303+
},
273304
{
274305
id: 'retail-react-app-test-project',
275306
name: 'Retail React App Test Project',

0 commit comments

Comments
 (0)