Skip to content

Commit 48eaa09

Browse files
run metrics in sfp container
1 parent 3dc14bc commit 48eaa09

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/ciCreatePlatformPool.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,27 @@ jobs:
7979
echo "::warning title=To many active Scratch Orgs::Max active scratch orgs: $maxActiveScratchOrgs. Remaining scratch orgs: $remainingActiveScratchOrgs. Threshold: ${POOL_REMAINING_ACTIVE_SCRATCH_ORG_LIMIT}."
8080
echo "canReplenishPool=false" >> "$GITHUB_OUTPUT"
8181
fi
82+
83+
pushMetrics:
84+
runs-on: ubuntu-latest
85+
container: ghcr.io/flxbl-io/sfp:${{ vars.SFP_CONTAINER_VERSION }}
86+
timeout-minutes: 720 #Set to Maximum Time out
87+
permissions:
88+
contents: read
89+
packages: read
90+
env:
91+
METRICSKEY: ${{ secrets.METRICS_KEYS }}
92+
steps:
93+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
94+
with:
95+
ref: ${{ inputs.gitRef }}
96+
fetch-depth: 0
97+
persist-credentials: false
98+
- name: "Authenticate Dev Hub"
99+
uses: navikt/sf-gha-authenticateOrg@da2f995ee865e05111574719abfc5ba12b459f0c
100+
with:
101+
auth-url: ${{ secrets.SF_DEVHUB_URL }}
102+
alias: devhub
82103
- name: Push metrics
83104
id: pushMetrics
84105
run: |
@@ -94,11 +115,9 @@ jobs:
94115
--arg runner utah \
95116
--arg sig "$sig" \
96117
'{"runner":$runner,"metrics":$msg,"signature":$sig}' |
97-
curl -D- -H 'Content-Type: application/json' --data-binary @- \
98-
https://sf-github-metrics.ekstern.dev.nav.no/measures/job/sfplatform
118+
tee >(curl -D- -H 'Content-Type: application/json' --data-binary @- \
119+
https://sf-github-metrics.ekstern.dev.nav.no/measures/job/sfplatform)
99120
env:
100-
POOL_REMAINING_DAILY_SCRATCH_ORG_LIMIT: ${{ vars.POOL_REMAINING_DAILY_SCRATCH_ORG_LIMIT }}
101-
POOL_REMAINING_ACTIVE_SCRATCH_ORG_LIMIT: ${{ vars.POOL_REMAINING_ACTIVE_SCRATCH_ORG_LIMIT }}
102121
METRICSKEY: ${{ secrets.METRICS_KEYS }}
103122

104123
prepareMatrix:

0 commit comments

Comments
 (0)