CLI Implement Trigger Git Meta Data
With npx checkly test --record cli script we can specify GIT meta data enviroment variables to overwrite and existing or set and non-existing values.
This doesnt work with npx checkly trigger --record script.
Usecase:
We have our tests in a project, our pipeline packages the project and pushes to a tool called 'Octopus Server' to actually release the production files. As part of release process we want to trigger the tests to run.
I have the trigger script working but setting the git meta data env values does not work.
Here is full script we're using (its in powershell)
$env:CHECKLY_API_KEY="Our Key"
$env:CHECKLY_ACCOUNT_ID="Our Account ID"
$env:CHECKLY_REPO_BRANCH="A branch name"
$env:CHECKLY_REPO_COMMIT_OWNER="Person who triggered release"
$env:CHECKLY_TEST_ENVIRONMENT="Our Test Environment"
$env:CHECKLY_REPO_COMMIT_MESSAGE="E2E Test Run"
npx checkly trigger --record --tags=some-tag -e ENVIRONMENT_URL=https://dynamic-uat-or-prod-url.com --test-session-name="Product Name: https://dynamic-uat-or-prod-url.com" --location=eu-west-1 --reporter=ciI've also tried specifying the Git meta data via the -e setting which also doesn't work.
Log in to comment and vote
Comments2
Tim Nolet
Aug 30, 2023
Hey Nick, thanks for reporting. We are looking at this right now. We decided at first to not implement this, as there is no guarantee that triggering a set of checks will line up with a commit or branch. But I guess when adding the
--recordflag, we explicitly hand that decision over to you, the user. Does that sound right?Nick McBurney
Aug 30, 2023
Yeah makes sense. In my case there is no commit/branch and really I'm wanting to use the GIT meta data to provide my own meta data to provide more information when reviewing test sessions.