-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add basic scratch org config and pipeline
- Loading branch information
Showing
5 changed files
with
129 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: create-scratch-org | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
name: | ||
description: Scratch Org Name | ||
type: string | ||
description: | ||
description: Scratch Org Description | ||
type: string | ||
email: | ||
description: Scratch Org User Email | ||
type: string | ||
lifespan: | ||
description: Lifespan in Days (1-30) | ||
type: number | ||
default: 1 | ||
deploy-metadata: | ||
description: Should Metadata be deployed? | ||
type: boolean | ||
default: true | ||
install-packages: | ||
description: Should Packages be installed? | ||
type: boolean | ||
default: true | ||
packages: | ||
description: Packages to be installed | ||
type: string | ||
default: "['04t6S000001UjutQAC']" # Install Marketing Cloud package | ||
|
||
jobs: | ||
create-scratch-org: | ||
name: Create Scratch Org | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
with: | ||
fetch-depth: 0 | ||
- name: Select Node Version | ||
uses: svierk/get-node-version@main | ||
- name: Install SF CLI | ||
uses: svierk/sfdx-cli-setup@main | ||
- name: Authorize DevHub | ||
uses: svierk/sfdx-login@main | ||
with: | ||
client-id: ${{ secrets.SFDX_CONSUMER_KEY }} | ||
jwt-secret-key: ${{ secrets.SFDX_JWT_SECRET_KEY }} | ||
username: ${{ secrets.SFDX_USERNAME }} | ||
set-default: true | ||
set-default-dev-hub: true | ||
alias: devhub | ||
- name: Create Scratch Org | ||
uses: svierk/sfdx-create-scratch-org@main | ||
with: | ||
alias: scratch-${{ github.run_id }} | ||
name: ${{ inputs.name }} | ||
description: ${{ inputs.description }} | ||
admin-email: ${{ inputs.email }} | ||
set-default: true | ||
definition-file: config/project-scratch-def.json | ||
target-dev-hub: devhub | ||
duration-days: ${{ inputs.lifespan }} | ||
wait: 10 | ||
- name: Package Installation | ||
if: ${{ inputs.install-packages }} | ||
uses: svierk/sfdx-package-installation@main | ||
with: | ||
packages: ${{ inputs.packages }} | ||
wait: 30 | ||
publish-wait: 20 | ||
- name: Deploy Metadata | ||
if: ${{ inputs.deploy-metadata }} | ||
run: sf project deploy start | ||
- name: Generate Password | ||
run: sf org generate password --target-org scratch-${{ github.run_id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
{ | ||
"orgName": "svierk company", | ||
"edition": "Developer", | ||
"features": ["EnableSetPasswordInApi"], | ||
"orgName": "sample company", | ||
"edition": "Enterprise", | ||
"features": ["Communities", "PersonAccounts", "ServiceCloud"], | ||
"settings": { | ||
"lightningExperienceSettings": { | ||
"enableS1DesktopEnabled": true | ||
"chatterSettings": { | ||
"enableChatter": true | ||
}, | ||
"mobileSettings": { | ||
"enableS1EncryptedStoragePref2": false | ||
"communitiesSettings": { | ||
"enableNetworksEnabled": true | ||
}, | ||
"experienceBundleSettings": { | ||
"enableExperienceBundleMetadata": true | ||
}, | ||
"languageSettings": { | ||
"enableTranslationWorkbench": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Name | ||
CSV IMPORT TEST 1 | ||
CSV IMPORT TEST 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"records": [ | ||
{ | ||
"attributes": { | ||
"type": "Account", | ||
"referenceId": "AccountRef1" | ||
}, | ||
"Name": "JSON IMPORT TEST 1" | ||
}, | ||
{ | ||
"attributes": { | ||
"type": "Account", | ||
"referenceId": "AccountRef2" | ||
}, | ||
"Name": "JSON IMPORT TEST 2" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"records": [ | ||
{ | ||
"attributes": { | ||
"type": "Contact", | ||
"referenceId": "ContactRef1" | ||
}, | ||
"LastName": "JSON IMPORT TEST 1" | ||
}, | ||
{ | ||
"attributes": { | ||
"type": "Contact", | ||
"referenceId": "ContactRef2" | ||
}, | ||
"LastName": "JSON IMPORT TEST 2" | ||
} | ||
] | ||
} |