ci(e2e): bind behaviour job to dev and stage environments - #6364
Conversation
Map authorized PRs and merge-queue runs to GitHub Environment dev, and push-to-main to stage, and expose the same value as ENVIRONMENT so the suite can target STAGE infra later. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
PR Summary by QodoBind behaviour E2E runs to dev and stage environments
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Site previewPreview: https://9270017b-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 8:00 AM UTC · Completed 8:13 AM UTC Commit: |
Code Review by Qodo
1.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ReviewFindingsHigh
Next steps:
Previous runReviewFindingsHigh
Low
Next steps:
|
|
/fs-fix |
Job-level ENVIRONMENT already reaches every step. Put the operator branch restriction for the stage GitHub Environment in numbered steps. Signed-off-by: Barak Korren <bkorren@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 9:56 AM UTC · Completed 10:09 AM UTC Commit: |
waynesun09
left a comment
There was a problem hiding this comment.
LGTM. Validated at head f9d8164: the behaviour-job if correctly restricts to push-to-main / merge_group / authorized PRs, environment keys off event_name (right call for pull_request_target), ENVIRONMENT is set once at job level and validated in RunnerConfig.Validate with tests. Earlier bot findings (redundant step env, prose procedure) are addressed; CI green. The remaining fullsend-ai-review protected-path finding is satisfied by human approval.
Summary
dev(authorized PRs and merge queue) andstage(push tomain); skipworkflow_dispatchand other triggers.ENVIRONMENTenv var to the suite (dev/stage, local defaultdev) so later STAGE-infra work does not have to guess the trigger.deployment: truefrom the scalarenvironment:key; the job token is not granteddeployments: write.Part of the work for #5115. This PR does not close that issue.
Test plan
devenvironment and hasENVIRONMENT=dev.mainrun appears understageand hasENVIRONMENT=stage.workflow_dispatchof E2E Tests skips the behaviour job (admine2ejob still runs).behaviourcheck (required) bound todev.go test ./pkg/behaviourtest/drivers/env/passes locally.