Skip to content

Commit

Permalink
FLEXY-4848: use flag for e2e label
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjeet-tw committed Oct 31, 2023
1 parent 001b27b commit b5c769a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/pr_e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
get-version:
if: ${{ github.event.label.name == 'run-e2e-test' }}
if: ${{ github.event.label.name == vars.E2E_LABEL }}
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.extractBranch.outputs.branch }}
Expand All @@ -25,14 +25,13 @@ jobs:
run: |
currentVersion=$(awk '/version/{gsub(/("|",)/,"",$2);print $2}' lerna.json)
semver=( ${currentVersion//./ } )
echo "version=6.2.4-alpha.202310231329" >> "$GITHUB_OUTPUT"
# echo "version=${semver[0]}.${semver[1]}.$((semver[2] + 1))-alpha.$(date '+%Y%m%d%H%M')" >> "$GITHUB_OUTPUT"
echo "version=${semver[0]}.${semver[1]}.$((semver[2] + 1))-alpha.$(date '+%Y%m%d%H%M')" >> "$GITHUB_OUTPUT"
id: alphaVersion

release-alpha-version:
needs: get-version
uses: ./.github/workflows/reusable_publish.yaml
if: ${{ github.event.label.name == 'run-e2e' }}
if: ${{ github.event.label.name == vars.E2E_LABEL }}
with:
TAG: alpha
VERSION: ${{ needs.get-version.outputs.version }}
Expand All @@ -43,10 +42,9 @@ jobs:
SLACK_WEB_HOOK: ${{ secrets.SLACK_WEB_HOOK }}

e2e-test:
needs: [ get-version ]
# needs: [ get-version, release-alpha-version ]
needs: [ get-version, release-alpha-version ]
uses: ./.github/workflows/reusable_e2e.yaml
if: ${{ github.event.label.name == 'run-e2e-test' }}
if: ${{ github.event.label.name == vars.E2E_LABEL }}
with:
BRANCH: ${{ needs.get-version.outputs.branch }}
NPM_IGNORE_PREFIX: ${{ vars.NPM_IGNORE_PREFIX }}
Expand Down
8 changes: 6 additions & 2 deletions packages/flex-plugin-e2e-tests/src/utils/spawn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ export const killChildProcess = async (
logger.error(`Error killing the process, error message is: ${error}`);
logger.error(`Check is Process status: ${error}`);
await promisifiedSpawn('tasklist', ['/v', '/fi', `"PID eq ${child.pid}"`]);
// logger.info("Trying second time to kill the process");
// await promisifiedSpawn('taskkill', ['/pid', `${child.pid}`, '/f', '/t']);
logger.info("Trying second time to kill the process");

promisifiedSpawn('taskkill', ['/pid', `${child.pid}`, '/f', '/t'])
.catch((error2) => {
logger.error(`Taskkill failed on 2nd attempt as well with error: ${error2}`);
})
});
} else {
child.kill();
Expand Down

0 comments on commit b5c769a

Please sign in to comment.