Skip to content

Commit beaf275

Browse files
committed
invert mrt flags
1 parent 6235ba2 commit beaf275

File tree

54 files changed

+145
-199
lines changed

Some content is hidden

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

54 files changed

+145
-199
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@salesforce/b2c-tooling-sdk': patch
3+
'@salesforce/b2c-cli': patch
4+
'@salesforce/b2c-dx-mcp': patch
5+
---
6+
7+
MRT environment variables now use non-prefixed names (`MRT_API_KEY`, `MRT_PROJECT`, `MRT_ENVIRONMENT`, `MRT_CLOUD_ORIGIN`) as primary. The `SFCC_`-prefixed versions continue to work as fallbacks.

actions/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ All actions accept auth inputs directly or read from `SFCC_*` environment variab
9696
| `password` | `SFCC_PASSWORD` | WebDAV operations |
9797
| `short-code` | `SFCC_SHORTCODE` | SCAPI operations |
9898
| `tenant-id` | `SFCC_TENANT_ID` | SCAPI operations |
99-
| `mrt-api-key` | `SFCC_MRT_API_KEY` | MRT operations |
100-
| `mrt-project` | `SFCC_MRT_PROJECT` | MRT operations |
101-
| `mrt-environment` | `SFCC_MRT_ENVIRONMENT` | MRT operations |
99+
| `mrt-api-key` | `MRT_API_KEY` | MRT operations |
100+
| `mrt-project` | `MRT_PROJECT` | MRT operations |
101+
| `mrt-environment` | `MRT_ENVIRONMENT` | MRT operations |
102102
| `account-manager-host` | `SFCC_ACCOUNT_MANAGER_HOST` | Account Manager |
103103

104104
## Plugins

actions/mrt-deploy/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ branding:
66

77
inputs:
88
project:
9-
description: 'MRT project slug (falls back to SFCC_MRT_PROJECT env var)'
9+
description: 'MRT project slug (falls back to MRT_PROJECT env var)'
1010
required: false
1111
environment:
12-
description: 'Target environment (falls back to SFCC_MRT_ENVIRONMENT env var)'
12+
description: 'Target environment (falls back to MRT_ENVIRONMENT env var)'
1313
required: false
1414
build-directory:
1515
description: 'Local build directory'
@@ -23,7 +23,7 @@ inputs:
2323
required: false
2424
# Auth inputs for standalone use
2525
mrt-api-key:
26-
description: 'MRT API key (falls back to SFCC_MRT_API_KEY env var)'
26+
description: 'MRT API key (falls back to MRT_API_KEY env var)'
2727
required: false
2828
# Setup inputs
2929
version:

actions/setup/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ inputs:
3838
description: 'Tenant ID → SFCC_TENANT_ID'
3939
required: false
4040
mrt-api-key:
41-
description: 'MRT API key → SFCC_MRT_API_KEY'
41+
description: 'MRT API key → MRT_API_KEY'
4242
required: false
4343
mrt-project:
44-
description: 'MRT project slug → SFCC_MRT_PROJECT'
44+
description: 'MRT project slug → MRT_PROJECT'
4545
required: false
4646
mrt-environment:
47-
description: 'MRT environment → SFCC_MRT_ENVIRONMENT'
47+
description: 'MRT environment → MRT_ENVIRONMENT'
4848
required: false
4949
account-manager-host:
5050
description: 'Account Manager hostname → SFCC_ACCOUNT_MANAGER_HOST'
@@ -116,13 +116,13 @@ runs:
116116
echo "SFCC_TENANT_ID=${{ inputs.tenant-id }}" >> "$GITHUB_ENV"
117117
fi
118118
if [ -n "${{ inputs.mrt-api-key }}" ]; then
119-
echo "SFCC_MRT_API_KEY=${{ inputs.mrt-api-key }}" >> "$GITHUB_ENV"
119+
echo "MRT_API_KEY=${{ inputs.mrt-api-key }}" >> "$GITHUB_ENV"
120120
fi
121121
if [ -n "${{ inputs.mrt-project }}" ]; then
122-
echo "SFCC_MRT_PROJECT=${{ inputs.mrt-project }}" >> "$GITHUB_ENV"
122+
echo "MRT_PROJECT=${{ inputs.mrt-project }}" >> "$GITHUB_ENV"
123123
fi
124124
if [ -n "${{ inputs.mrt-environment }}" ]; then
125-
echo "SFCC_MRT_ENVIRONMENT=${{ inputs.mrt-environment }}" >> "$GITHUB_ENV"
125+
echo "MRT_ENVIRONMENT=${{ inputs.mrt-environment }}" >> "$GITHUB_ENV"
126126
fi
127127
if [ -n "${{ inputs.account-manager-host }}" ]; then
128128
echo "SFCC_ACCOUNT_MANAGER_HOST=${{ inputs.account-manager-host }}" >> "$GITHUB_ENV"

actions/workflow-templates/b2c-mrt-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515

1616
- uses: SalesforceCommerceCloud/b2c-developer-tooling/actions/mrt-deploy@v1
1717
with:
18-
mrt-api-key: ${{ secrets.SFCC_MRT_API_KEY }}
19-
project: ${{ vars.SFCC_MRT_PROJECT }}
20-
environment: ${{ vars.SFCC_MRT_ENVIRONMENT }}
18+
mrt-api-key: ${{ secrets.MRT_API_KEY }}
19+
project: ${{ vars.MRT_PROJECT }}
20+
environment: ${{ vars.MRT_ENVIRONMENT }}
2121
build-directory: build
2222
message: 'Release ${{ github.event.release.tag_name }}'

docs/cli/mrt.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ These flags are available on all MRT commands:
2828

2929
| Flag | Environment Variable | Description |
3030
|------|---------------------|-------------|
31-
| `--api-key` | `SFCC_MRT_API_KEY` | MRT API key |
32-
| `--project`, `-p` | `SFCC_MRT_PROJECT` | MRT project slug |
33-
| `--environment`, `-e` | `SFCC_MRT_ENVIRONMENT` | Target environment (e.g., staging, production) |
31+
| `--api-key` | `MRT_API_KEY` | MRT API key |
32+
| `--project`, `-p` | `MRT_PROJECT` | MRT project slug |
33+
| `--environment`, `-e` | `MRT_ENVIRONMENT` | Target environment (e.g., staging, production). `MRT_TARGET` also supported. |
3434

3535
### Configuration Sources
3636

@@ -56,7 +56,7 @@ MRT commands use API key authentication. The API key is configured in the Manage
5656
Provide the API key via one of these methods:
5757

5858
1. **Command-line flag**: `--api-key your-api-key`
59-
2. **Environment variable**: `export SFCC_MRT_API_KEY=your-api-key`
59+
2. **Environment variable**: `export MRT_API_KEY=your-api-key`
6060
3. **Mobify config file**: `~/.mobify` with `api_key` field
6161

6262
```json

docs/guide/authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ MRT commands use a separate API key system.
357357

358358
```bash
359359
# Environment variable
360-
export SFCC_MRT_API_KEY=your-mrt-api-key
360+
export MRT_API_KEY=your-mrt-api-key
361361

362362
# Or in ~/.mobify config file
363363
echo '{"api_key": "your-mrt-api-key"}' > ~/.mobify

docs/guide/ci-cd.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ Store credentials as GitHub [repository secrets](https://docs.github.com/en/acti
2929
| `SFCC_CLIENT_SECRET` | OAuth Client Secret |
3030
| `SFCC_USERNAME` | WebDAV username |
3131
| `SFCC_PASSWORD` | WebDAV password/access key |
32-
| `SFCC_MRT_API_KEY` | MRT API key |
32+
| `MRT_API_KEY` | MRT API key |
3333

3434
**Recommended variables:**
3535

3636
| Variable | Description |
3737
|----------|-------------|
3838
| `SFCC_SERVER` | B2C instance hostname |
39-
| `SFCC_MRT_PROJECT` | MRT project slug |
40-
| `SFCC_MRT_ENVIRONMENT` | MRT environment |
39+
| `MRT_PROJECT` | MRT project slug |
40+
| `MRT_ENVIRONMENT` | MRT environment |
4141

4242
Credentials can be passed per-action or set once with the **setup** action so they're available to all subsequent steps.
4343

@@ -213,9 +213,9 @@ Push and deploy an MRT bundle.
213213
```yaml
214214
- uses: SalesforceCommerceCloud/b2c-developer-tooling/actions/mrt-deploy@v1
215215
with:
216-
mrt-api-key: ${{ secrets.SFCC_MRT_API_KEY }}
217-
project: ${{ vars.SFCC_MRT_PROJECT }}
218-
environment: ${{ vars.SFCC_MRT_ENVIRONMENT }}
216+
mrt-api-key: ${{ secrets.MRT_API_KEY }}
217+
project: ${{ vars.MRT_PROJECT }}
218+
environment: ${{ vars.MRT_ENVIRONMENT }}
219219
build-directory: build
220220
message: 'Deploy from CI'
221221
```
@@ -330,9 +330,9 @@ jobs:
330330

331331
- uses: SalesforceCommerceCloud/b2c-developer-tooling/actions/mrt-deploy@v1
332332
with:
333-
mrt-api-key: ${{ secrets.SFCC_MRT_API_KEY }}
334-
project: ${{ vars.SFCC_MRT_PROJECT }}
335-
environment: ${{ vars.SFCC_MRT_ENVIRONMENT }}
333+
mrt-api-key: ${{ secrets.MRT_API_KEY }}
334+
project: ${{ vars.MRT_PROJECT }}
335+
environment: ${{ vars.MRT_ENVIRONMENT }}
336336
build-directory: build
337337
message: 'Release ${{ github.event.release.tag_name }}'
338338
```

docs/guide/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ You can configure the CLI using environment variables:
7878
| `SFCC_SANDBOX_API_HOST` | ODS (sandbox) API hostname |
7979
| `SFCC_CIP_HOST` | CIP analytics host override |
8080
| `SFCC_CIP_STAGING` | Use staging CIP analytics host (`true`/`false`) |
81-
| `SFCC_MRT_API_KEY` | MRT API key |
82-
| `SFCC_MRT_PROJECT` | MRT project slug |
83-
| `SFCC_MRT_ENVIRONMENT` | MRT environment name |
84-
| `SFCC_MRT_CLOUD_ORIGIN` | MRT API origin URL override |
81+
| `MRT_API_KEY` | MRT API key (`SFCC_MRT_API_KEY` also supported) |
82+
| `MRT_PROJECT` | MRT project slug (`SFCC_MRT_PROJECT` also supported) |
83+
| `MRT_ENVIRONMENT` | MRT environment name (`SFCC_MRT_ENVIRONMENT`, `MRT_TARGET` also supported) |
84+
| `MRT_CLOUD_ORIGIN` | MRT API origin URL override (`SFCC_MRT_CLOUD_ORIGIN` also supported) |
8585

8686
## .env File
8787

@@ -337,7 +337,7 @@ When you explicitly specify a hostname that differs from the `dw.json` hostname,
337337
Managed Runtime (MRT) commands use an API key for authentication. The API key is resolved in this order:
338338

339339
1. `--api-key` flag
340-
2. `SFCC_MRT_API_KEY` environment variable
340+
2. `MRT_API_KEY` environment variable (also accepts `SFCC_MRT_API_KEY`)
341341
3. `~/.mobify` config file
342342

343343
The `~/.mobify` file format:

docs/guide/storefront-next.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Set up a Managed Runtime environment to host your storefront.
6666
- An MRT project (see [`b2c mrt project create`](/cli/mrt#b2c-mrt-project-create) to create one)
6767

6868
::: tip
69-
Configure your API key in `~/.mobify`, `dw.json`, or via the `SFCC_MRT_API_KEY` environment variable so you don't need to pass it on every command. See [Configuration](/guide/configuration) for all available options.
69+
Configure your API key in `~/.mobify`, `dw.json`, or via the `MRT_API_KEY` environment variable so you don't need to pass it on every command. See [Configuration](/guide/configuration) for all available options.
7070
:::
7171

7272
Find your short code in Business Manager under **Administration > Salesforce Commerce API Settings**.

0 commit comments

Comments
 (0)