Skip to content

Commit

Permalink
chore(cleaning): fix org cleaning derp (#1068)
Browse files Browse the repository at this point in the history
<!-- For Coveo Employees only. Fill this section.

CDX-764

-->

## Proposed changes

We missed a change when updating the platform client, this address that.

## Testing
CI/CD
  • Loading branch information
louis-bompart committed Dec 13, 2022
1 parent dbfa392 commit 656d951
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/actions/e2e-clean/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ runs:
- name: Decrypt config
shell: bash
run: echo ${{inputs.cliConfigJson}} | base64 --decode | gpg --quiet --batch --yes --decrypt --passphrase="${{ env.E2E_TOKEN_PASSPHRASE }}" --output decrypted
- name: Delete test org
- name: Login
shell: bash
env:
DISPLAY: ':1'
Expand All @@ -25,7 +25,10 @@ runs:
Xvfb :1 -screen 0 1024x768x16 & sleep 1
xdg-settings set default-web-browser google-chrome.desktop
node -r ts-node/register/transpile-only packages/cli-e2e/cleaning.ts
node ./scripts/cleaning/delete-orgs.js
- name: Delete test orgs
shell: bash
if: always()
run: node ./scripts/cleaning/delete-orgs.js
- name: Delete test API key
shell: bash
if: always()
Expand Down
8 changes: 6 additions & 2 deletions scripts/cleaning/delete-orgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ async function deleteTestOrgs(platform, cliOrgs) {
}

async function main() {
const {TEST_RUN_ID: testRunId, PLATFORM_ENV: env} = process.env;
const {
ORG_ID: testOrgId,
TEST_RUN_ID: testRunId,
PLATFORM_ENV: env,
} = process.env;
const accessToken = getCliConfig().accessToken;
const platform = getClient(accessToken, env);
const platform = getClient(accessToken, env, testOrgId);
try {
const orgs = await platform.organization.list();
const cliOrgs = orgs
Expand Down

0 comments on commit 656d951

Please sign in to comment.