Skip to content

Commit e6b2c0f

Browse files
authored
Merge pull request #3 from Think2Corp/fix_CI
Fix ci
2 parents 735ba3e + 39c6cb3 commit e6b2c0f

5 files changed

Lines changed: 19 additions & 11 deletions

File tree

.github/workflows/agentforce-validate.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ jobs:
5050
run: |
5151
sf project deploy start --target-org=so-ci --manifest=manifestAgent.xml --wait=30
5252
53+
- name: 'Deploy Agentforce Tests to org'
54+
run: |
55+
sf project deploy start --target-org=so-ci --metadata=AiEvaluationDefinition --wait=30
56+
5357
- name: 'Capture org auth URL'
5458
id: capture-org
5559
run: |
@@ -252,9 +256,13 @@ jobs:
252256
echo "${{ secrets.DEVHUB_SFDX_AUTH_URL }}" > ./authfile
253257
sf org login sfdx-url --sfdxurlfile=authfile --alias=devhub
254258
255-
- name: Return org to pool
259+
- name: Authenticate to org
256260
run: |
257261
AUTH_URL=$(cat auth-artifact/auth-url.txt)
258-
echo "$AUTH_URL" > ./org-auth.txt
259-
sf org login sfdx-url --sfdxurlfile=org-auth.txt --alias=so-ci
260-
pnpm sfp pool delete --targetdevhubusername=devhub --tag=ci-pool --myorg=so-ci
262+
echo "$AUTH_URL" > ./authfileci
263+
sf org login sfdx-url --sfdxurlfile=authfileci --alias=so-ci
264+
265+
- name: Return org to pool
266+
run: |
267+
ORG_ID=$(sf org display -o so-ci --json | jq -r '.result.id' | cut -c 1-15)
268+
sf data update record -o devhub --sobject ScratchOrgInfo --where "ScratchOrg='$ORG_ID'" --values "Allocation_status__c='Available'"

config/pools/ci-pool.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"tag": "ci-pool",
3-
"maxAllocation": 1,
3+
"maxAllocation": 2,
44
"expiry": 10,
55
"batchSize": 10,
66
"configFilePath": "config/project-scratch-def.json",
77
"relaxAllIPRanges": true,
88
"installAll": true,
99
"enableSourceTracking": true,
1010
"retryOnFailure": true,
11-
"succeedOnDeploymentErrors": true
11+
"succeedOnDeploymentErrors": true,
12+
"postDeploymentScriptPath": "scripts/postDeployment.sh"
1213
}

config/pools/dev-pool.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
"installAll": true,
99
"enableSourceTracking": true,
1010
"retryOnFailure": true,
11-
"succeedOnDeploymentErrors": true
11+
"succeedOnDeploymentErrors": true,
12+
"postDeploymentScriptPath": "scripts/postDeployment.sh"
1213
}

manifestAgent.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,5 @@
3232
<members>*</members>
3333
<name>BotTemplate</name>
3434
</types>
35-
<types>
36-
<members>*</members>
37-
<name>AiEvaluationDefinition</name>
38-
</types>
3935
<version>65.0</version>
4036
</Package>

scripts/retrieveAgentAndTest.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sf project retrieve start -o so-dev --manifest manifestAgent.xml
2+
sf project retrieve start -o so-dev --metadata AiEvaluationDefinition

0 commit comments

Comments
 (0)