From 7e107153cecb948cb9b2289b27506b99067e2737 Mon Sep 17 00:00:00 2001
From: Nathan Abondance <32196400+nabondance@users.noreply.github.com>
Date: Sun, 9 Nov 2025 16:24:11 +0100
Subject: [PATCH 1/3] fix CI test deploy
---
.github/workflows/agentforce-validate.yml | 4 ++++
manifestAgent.xml | 4 ----
scripts/retrieveAgentAndTest.sh | 2 ++
3 files changed, 6 insertions(+), 4 deletions(-)
create mode 100755 scripts/retrieveAgentAndTest.sh
diff --git a/.github/workflows/agentforce-validate.yml b/.github/workflows/agentforce-validate.yml
index 32ac07c..6720bd9 100644
--- a/.github/workflows/agentforce-validate.yml
+++ b/.github/workflows/agentforce-validate.yml
@@ -50,6 +50,10 @@ jobs:
run: |
sf project deploy start --target-org=so-ci --manifest=manifestAgent.xml --wait=30
+ - name: 'Deploy Agentforce Tests to org'
+ run: |
+ sf project deploy start --target-org=so-ci --metadata=AiEvaluationDefinition --wait=30
+
- name: 'Capture org auth URL'
id: capture-org
run: |
diff --git a/manifestAgent.xml b/manifestAgent.xml
index fb3fbaa..68f8d93 100644
--- a/manifestAgent.xml
+++ b/manifestAgent.xml
@@ -32,9 +32,5 @@
*
BotTemplate
-
- *
- AiEvaluationDefinition
-
65.0
\ No newline at end of file
diff --git a/scripts/retrieveAgentAndTest.sh b/scripts/retrieveAgentAndTest.sh
new file mode 100755
index 0000000..2a6762f
--- /dev/null
+++ b/scripts/retrieveAgentAndTest.sh
@@ -0,0 +1,2 @@
+sf project retrieve start -o so-dev --manifest manifestAgent.xml
+sf project retrieve start -o so-dev --metadata AiEvaluationDefinition
\ No newline at end of file
From e194d4e7bdf9f23a65d6f4989defbec575971b46 Mon Sep 17 00:00:00 2001
From: Nathan Abondance <32196400+nabondance@users.noreply.github.com>
Date: Sun, 9 Nov 2025 16:48:12 +0100
Subject: [PATCH 2/3] Return org to pool automatically
---
.github/workflows/agentforce-validate.yml | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/agentforce-validate.yml b/.github/workflows/agentforce-validate.yml
index 6720bd9..1814581 100644
--- a/.github/workflows/agentforce-validate.yml
+++ b/.github/workflows/agentforce-validate.yml
@@ -256,9 +256,13 @@ jobs:
echo "${{ secrets.DEVHUB_SFDX_AUTH_URL }}" > ./authfile
sf org login sfdx-url --sfdxurlfile=authfile --alias=devhub
- - name: Return org to pool
+ - name: Authenticate to org
run: |
AUTH_URL=$(cat auth-artifact/auth-url.txt)
- echo "$AUTH_URL" > ./org-auth.txt
- sf org login sfdx-url --sfdxurlfile=org-auth.txt --alias=so-ci
- pnpm sfp pool delete --targetdevhubusername=devhub --tag=ci-pool --myorg=so-ci
\ No newline at end of file
+ echo "$AUTH_URL" > ./authfileci
+ sf org login sfdx-url --sfdxurlfile=authfileci --alias=so-ci
+
+ - name: Return org to pool
+ run: |
+ ORG_ID=$(sf org display -o so-ci --json | jq -r '.result.id' | cut -c 1-15)
+ sf data update record -o devhub --sobject ScratchOrgInfo --where "ScratchOrg='$ORG_ID'" --values "Allocation_status__c='Available'"
From 39c6cb348e64068324b6bbe5a3a04e1650445364 Mon Sep 17 00:00:00 2001
From: Nathan Abondance <32196400+nabondance@users.noreply.github.com>
Date: Sun, 9 Nov 2025 17:15:07 +0100
Subject: [PATCH 3/3] fix prepare pool
---
config/pools/ci-pool.json | 5 +++--
config/pools/dev-pool.json | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/config/pools/ci-pool.json b/config/pools/ci-pool.json
index 9d13f6f..5318885 100644
--- a/config/pools/ci-pool.json
+++ b/config/pools/ci-pool.json
@@ -1,6 +1,6 @@
{
"tag": "ci-pool",
- "maxAllocation": 1,
+ "maxAllocation": 2,
"expiry": 10,
"batchSize": 10,
"configFilePath": "config/project-scratch-def.json",
@@ -8,5 +8,6 @@
"installAll": true,
"enableSourceTracking": true,
"retryOnFailure": true,
- "succeedOnDeploymentErrors": true
+ "succeedOnDeploymentErrors": true,
+ "postDeploymentScriptPath": "scripts/postDeployment.sh"
}
\ No newline at end of file
diff --git a/config/pools/dev-pool.json b/config/pools/dev-pool.json
index ab2b74e..71e2e99 100644
--- a/config/pools/dev-pool.json
+++ b/config/pools/dev-pool.json
@@ -8,5 +8,6 @@
"installAll": true,
"enableSourceTracking": true,
"retryOnFailure": true,
- "succeedOnDeploymentErrors": true
+ "succeedOnDeploymentErrors": true,
+ "postDeploymentScriptPath": "scripts/postDeployment.sh"
}
\ No newline at end of file