Skip to content

Conversation

kmontemayor2-sc
Copy link
Collaborator

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:

echo:
	@echo "GIT_BRANCH: ${GIT_BRANCH}"

and:

GIT_BRANCH=hello make echo
GIT_BRANCH: hello

@svij-sc
Copy link
Collaborator

svij-sc commented Jun 18, 2025

should we try validating locally that running a command w/ gcloud builds submit works in this case before we merge?

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 }}" \
Copy link
Collaborator

@svij-sc svij-sc Jun 19, 2025

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:

Suggested change
--substitutions=_CMD="GIT_HASH=$(git rev-parse HEAD) ${{ inputs.cmd }}" \
--substitutions=_CMD="${{ inputs.cmd }}",_GITHUB_REF="${{ github.ref }}" \

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kmontemayor2-sc
Copy link
Collaborator Author

/e2e_test

Copy link
Contributor

github-actions bot commented Jun 24, 2025

GiGL Automation

@ 17:11:22UTC : 🔄 E2E Test started.

@ 18:41:49UTC : ✅ Workflow completed successfully.

@kmontemayor2-sc
Copy link
Collaborator Author

/e2e_test

Copy link
Contributor

github-actions bot commented Jun 24, 2025

GiGL Automation

@ 22:28:58UTC : 🔄 E2E Test started.

@ 22:33:34UTC : ❌ Workflow failed.
Please check the logs for more details.

@kmontemayor2-sc
Copy link
Collaborator Author

/e2e_test

Copy link
Contributor

github-actions bot commented Jun 24, 2025

GiGL Automation

@ 22:57:39UTC : 🔄 E2E Test started.

@ 22:58:20UTC : ❌ Workflow failed.
Please check the logs for more details.

@kmontemayor2-sc
Copy link
Collaborator Author

/e2e_test

Copy link
Contributor

github-actions bot commented Jun 24, 2025

GiGL Automation

@ 23:09:12UTC : 🔄 E2E Test started.

@ 23:09:51UTC : ❌ Workflow failed.
Please check the logs for more details.

@kmontemayor2-sc
Copy link
Collaborator Author

/e2e_test

Copy link
Contributor

github-actions bot commented Jun 24, 2025

GiGL Automation

@ 23:17:12UTC : 🔄 E2E Test started.

@ 24:35:23UTC : ✅ Workflow completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants