Skip to content

Commit

Permalink
Improve small things in CI
Browse files Browse the repository at this point in the history
@W-14573387 | Improve small things in CI
  • Loading branch information
tarcang authored Dec 27, 2023
2 parents e20cafb + dcec29c commit f360840
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/closePR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ jobs:
- name: Cleanup the last created scratch org for the PR CI
run: |
LAST_SCRATCH_ID=`sf data query --query "SELECT Id FROM ActiveScratchOrg WHERE SignupUsername LIKE '%pr${{ env.PR_NUMBER }}%'" -o ${{ env.DEVHUB_USERNAME }} --json | jq -r '.result.records[0].Id'`
[ "$LAST_SCRATCH_ID" != "null" ] && sf data delete record -s ActiveScratchOrg -o ${{ env.DEVHUB_USERNAME }} -i $LAST_SCRATCH_ID
if [ "$LAST_SCRATCH_ID" != "null" ]; then sf data delete record -s ActiveScratchOrg -o ${{ env.DEVHUB_USERNAME }} -i $LAST_SCRATCH_ID; else echo 'No scratch org needs to be deleted.'; fi
9 changes: 4 additions & 5 deletions .github/workflows/e2etest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
e2e-test:
runs-on: ubuntu-latest
env:
DEVHUB_USERNAME: ${{ secrets.PATCH_DEVHUB_USERNAME }}
DEVHUB_AUTH: ${{ secrets.PATCH_DEVHUB_AUTH }}
DEVHUB_USERNAME: ${{ secrets.DEVHUB_USERNAME }}
DEVHUB_AUTH: ${{ secrets.DEVHUB_AUTH }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: Checkout
Expand All @@ -32,10 +32,9 @@ jobs:
echo ${{ env.DEVHUB_AUTH }} > authFile
sf force auth sfdxurl store -f 'authFile'
- name: Cleanup The Latest Scratch Org From This Pull Request
continue-on-error: true
run: |
LAST_SCRATCH_ID=`sf data query --query "SELECT Id FROM ActiveScratchOrg WHERE SignupUsername LIKE '%pr${{ env.PR_NUMBER }}%'" -o ${{ env.DEVHUB_USERNAME }} --json | jq -r '.result.records[0].Id'`
[ "$LAST_SCRATCH_ID" != "null" ] && sf data delete record -s ActiveScratchOrg -o ${{ env.DEVHUB_USERNAME }} -i $LAST_SCRATCH_ID
if [ "$LAST_SCRATCH_ID" != "null" ]; then sf data delete record -s ActiveScratchOrg -o ${{ env.DEVHUB_USERNAME }} -i $LAST_SCRATCH_ID; else echo 'No scratch org needs to be deleted.'; fi
- name: Create Scratch Org
id: scratch-org-step
run: |
Expand All @@ -57,6 +56,6 @@ jobs:
- name: Create B2B Aura Store
env:
SCRATCH_ORG_USERNAME: ${{ steps.scratch-org-step.outputs.USERNAME }}
run: ./bin/run commerce:store:create -o b2b -t "B2B Commerce (Aura)" -n b2baurastore01 -b b2cbuyer@commerce.com -v ${{ env.DEVHUB_USERNAME }} -u ${{ env.SCRATCH_ORG_USERNAME }} --json
run: ./bin/run commerce:store:create -o b2b -t "B2B Commerce (Aura)" -n b2baurastore01 -b b2baurabuyer@commerce.com -v ${{ env.DEVHUB_USERNAME }} -u ${{ env.SCRATCH_ORG_USERNAME }} --json
- name: Confirmation
run: echo "All stores are created!"

0 comments on commit f360840

Please sign in to comment.