-
Notifications
You must be signed in to change notification settings - Fork 7
Try (again) to tag E2E pipelines with git branch #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
should we try validating locally that running a command w/ |
gcloud builds submit . \ | ||
--config=.github/cloud_builder/run_command_on_active_checkout.yaml \ | ||
--substitutions=_CMD="${{ inputs.cmd }}" \ | ||
--substitutions=_CMD="GIT_HASH=$(git rev-parse HEAD) ${{ inputs.cmd }}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, substitutions replaces _CMD
in GiGL/.github/cloud_builder/run_command_on_active_checkout.yaml
We could modify that script to have another substitution off:
export GITHUB_REF=_ GITHUB_REF
echo "Finished setting up environment."
echo "========================="
echo "Running command: ${_CMD}"
echo "========================="
$_CMD
echo "Finished running command"
then, this command becomes:
--substitutions=_CMD="GIT_HASH=$(git rev-parse HEAD) ${{ inputs.cmd }}" \ | |
--substitutions=_CMD="${{ inputs.cmd }}",_GITHUB_REF="${{ github.ref }}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/e2e_test |
GiGL Automation@ 17:11:22UTC : 🔄 @ 18:41:49UTC : ✅ Workflow completed successfully. |
/e2e_test |
GiGL Automation@ 22:28:58UTC : 🔄 @ 22:33:34UTC : ❌ Workflow failed. |
/e2e_test |
GiGL Automation@ 22:57:39UTC : 🔄 @ 22:58:20UTC : ❌ Workflow failed. |
/e2e_test |
GiGL Automation@ 23:09:12UTC : 🔄 @ 23:09:51UTC : ❌ Workflow failed. |
/e2e_test |
GiGL Automation@ 23:17:12UTC : 🔄 @ 24:35:23UTC : ✅ Workflow completed successfully. |
Again what I'd like to do is add the git branch name to our e2e test runs. For example one of our existing runs, https://console.cloud.google.com/vertex-ai/pipelines/locations/us-central1/runs/cora-glt-udl-test-on--04698?inv=1&invt=Ab0dkw&project=external-snap-ci-github-gigl does not have any git branch name in it.
Adding the branch name to runs helps easily identify which runs are yours, and is generally helpful.
The last attempt to do this, #100, broke our tests as --set-build-env-vars is not a valid flag for gcloud builds submit.
Instead, I'll try to manually put the
GIT_BRANCH
into the CLI env.I tested locally with:
and: