Skip to content

Commit

Permalink
chore: updates to use Hutte pool
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoyaferrer committed Feb 14, 2024
1 parent 70665c6 commit 12e7103
Showing 1 changed file with 16 additions and 21 deletions.
37 changes: 16 additions & 21 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# DX@Scale CI/CD Template for GitHub
#----------------------------------------------------------------------------------------------------
# Follows reference pipeline available at docs.dxatscale.io
#
#
#-----------------------------------------------------------------------------------------------------
# To know more about dxatscale, visit https://docs.dxatscale.io
# To know more on sfpowerscripts, visit- https://docs.dxatscale.io/sfpowerscripts/sfpowerscripts



# This pipeline is used to validate an incoming change using a dev environment fetched from the CI pool

name: 'PR Validation - Auto Triggered'
name: "PR Validation - Auto Triggered"

on:
pull_request:
Expand All @@ -19,22 +17,19 @@ on:
- main
- release/**


workflow_dispatch:

#Set the environment variables for tracking metrics
#env:
#SFPOWERSCRIPTS_NEWRELIC: 'true'
#SFPOWERSCRIPTS_NEWRELIC_API_KEY: '${{ secrets.NEWRELIC_INSIGHT_INSERT_KEYS }}'
#SFPOWERSCRIPTS_DATADOG: 'true'
#SFPOWERSCRIPTS_DATADOG_HOST: '${{ secrets.DATADOG_HOST }}'
#SFPOWERSCRIPTS_DATADOG_API_KEY: '${{ secrets.DATADOG_API_KEY }}'


#SFPOWERSCRIPTS_NEWRELIC: 'true'
#SFPOWERSCRIPTS_NEWRELIC_API_KEY: '${{ secrets.NEWRELIC_INSIGHT_INSERT_KEYS }}'
#SFPOWERSCRIPTS_DATADOG: 'true'
#SFPOWERSCRIPTS_DATADOG_HOST: '${{ secrets.DATADOG_HOST }}'
#SFPOWERSCRIPTS_DATADOG_API_KEY: '${{ secrets.DATADOG_API_KEY }}'

jobs:
validate:
name: 'Validate Changed Packages'
name: "Validate Changed Packages"
runs-on: ubuntu-latest
container: ghcr.io/dxatscale/sfpowerscripts

Expand All @@ -43,16 +38,16 @@ jobs:
with:
fetch-depth: 0

- name: 'Authenticate Dev Hub'
- name: "Authenticate Dev Hub"
run: |
echo "${{ secrets.DEVHUB_SFDX_AUTH_URL }}" > ./authfile
sf org login sfdx-url -f authfile -a devhub
# Validate source and trigger test
- name: 'Push source to scratch org'
run: 'sfp orchestrator:validate -p ci -v devhub -x'



# Note: Using Hutte pool org rather than DX@Scale Pool
- name: "Push source to Hutte scratch org from pool"
run: |
echo y | sf plugins install hutte #TODO: Use public Hutte Docker image in Github
sf hutte pool take --api-token ${{ secrets.HUTTE_API_TOKEN }} --json --wait
poolOrgAlias=$(sf org display --json | jq -r '.result.alias')
sfp orchestrator:validateAgainstOrg -u --targetorg $poolOrgAlias --devhubalias ${{ vars.DEV_HUB_ALIAS }}

0 comments on commit 12e7103

Please sign in to comment.