Skip to content

Commit

Permalink
Merge pull request #997 from bcgov/BCMOHAD-18354-v3
Browse files Browse the repository at this point in the history
BCMOHAD-18354-v3 || Assigning HC permission set to deployment user
  • Loading branch information
NataliaNikishina authored Dec 5, 2023
2 parents ee7530c + 2434f9e commit 38b1c42
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/Manual Build Check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
run: sf org create scratch -v devhub --set-default -f config/project-scratch-def.json -a ciorg
# sfdx force:org:create -v devhub -s -f config/project-scratch-def.json -a ciorg -d 1

- name: Set deployment user standard security
run: |
sf force:user:permsetlicense:assign -u ciorg -n "Health Cloud"
sf force:user:permsetlicense:assign -u ciorg -n "Health Cloud Platform"
sf force:user:permset:assign -o ciorg -n HealthCloudFoundation
- name: Deploy source dev-app-pre
run: sf project deploy start -d dev-app-pre -o ciorg

Expand All @@ -47,10 +53,9 @@ jobs:
# The changes were made in accordance with Salesforce recommendations to move from sfdx commands to sf-style commands
# sfdx force:source:push -u ciorg

- name: Assign permission set and set user role
- name: Set deployment user custom security
run: |
sf force:user:permset:assign -o ciorg -n SA_Administrator
sf force:user:permset:assign -o ciorg -n HealthCloudFoundation
sf force:apex:execute -o ciorg -f scripts/apex/scratchorg-set-current-user.apex
# sfdx force:user:permset:assign -u ciorg -n SA_Administrator
# sfdx force:apex:execute -u ciorg -f scripts/apex/scratchorg-set-current-user.apex
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/build-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ jobs:
run: sf org create scratch -v devhub --set-default -f config/project-scratch-def.json -a ciorg
# sfdx force:org:create -v devhub -s -f config/project-scratch-def.json -a ciorg -d 1

- name: Set deployment user standard security
run: |
sf force:user:permsetlicense:assign -u ciorg -n "Health Cloud"
sf force:user:permsetlicense:assign -u ciorg -n "Health Cloud Platform"
sf force:user:permset:assign -o ciorg -n HealthCloudFoundation
- name: Deploy source dev-app-pre
run: sf project deploy start -d dev-app-pre -o ciorg

Expand All @@ -46,10 +52,9 @@ jobs:
# The changes were made in accordance with Salesforce recommendations to move from sfdx commands to sf-style commands
# sfdx force:source:push -u ciorg

- name: Assign permission set and set user role
- name: Set deployment user custom security
run: |
sf force:user:permset:assign -o ciorg -n SA_Administrator
sf force:user:permset:assign -o ciorg -n HealthCloudFoundation
sf force:apex:execute -o ciorg -f scripts/apex/scratchorg-set-current-user.apex
# sfdx force:user:permset:assign -u ciorg -n SA_Administrator
# sfdx force:apex:execute -u ciorg -f scripts/apex/scratchorg-set-current-user.apex
Expand Down
7 changes: 5 additions & 2 deletions dev-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ echo "Creating scratch org, \"$alias\"..."
dx force:org:create -v devhub -a $alias -f config/project-scratch-def.json -d $duration -s
dx force:data:record:update -u $alias -s Organization -w "Name='Special Authority Scratch Org'" -v "TimeZoneSidKey='America/Los_Angeles'"
dx force:data:record:update -u $alias -s User -w "Name='User User'" -v "TimeZoneSidKey='America/Los_Angeles'"
sfdx force:user:permsetlicense:assign -u $alias -n "Health Cloud"
sfdx force:user:permsetlicense:assign -u $alias -n "Health Cloud Platform"
sfdx force:user:permset:assign -u $alias -n HealthCloudFoundation

echo "Uploading source code..."
sfdx force:source:deploy -p dev-app-pre -u $alias
Expand All @@ -66,8 +69,8 @@ sfdx force:source:tracking:reset -u $alias --noprompt
# dx force:source:push -u $alias

echo "Assigning permissions..."
dx force:user:permset:assign -u $alias -n SA_Administrator
dx force:apex:execute -u $alias -f scripts/apex/scratchorg-set-current-user.apex
sfdx force:user:permset:assign -u $alias -n SA_Administrator
sfdx force:apex:execute -u $alias -f scripts/apex/scratchorg-set-current-user.apex

echo "Uploading data..."
dx force:data:bulk:upsert -u $alias -s Drug__c -f data/drugs.csv -i Drug_Code__c -w 5
Expand Down

0 comments on commit 38b1c42

Please sign in to comment.