Skip to content

Conversation

@Potterluo
Copy link

Purpose

This PR fixes a logic bug in the Jenkinsfile that caused the PR-Verification stage to be incorrectly entered during nightly (timer-triggered) builds.
We need this change to keep PR checks (short, fast feedback) separated from daily / full tests (longer, more exhaustive), avoiding resource waste and misleading build results.

Modifications

  • Added expression { env.CHANGE_ID != null } so that the PR stage only runs for real pull-request branches when using multibranch pipelines.
  • Wrapped the manual PR_VERIFY trigger with not { triggeredBy 'TimerTrigger' } to prevent nightly jobs from executing PR logic.
  • Converted all inline comments from Chinese to English for consistency.
  • Quoted a few environment variables for extra safety; no other behavioural changes.

These are not user-facing changes; they only affect CI execution paths.

Test

  1. Pushed the patched Jenkinsfile to a feature branch and opened a PR → only the PR-Verification stage ran (expected).
  2. Triggered “Build with Parameters” choosing DAILY_BUILD → only Daily Build & Smoke Test stage ran (expected).
  3. Let the nightly cron trigger (H 0 * * *) run → same behaviour as manual daily build, PR stage skipped (expected).
  4. All post-build steps (report collection, e-mail, workspace cleanup) continue to work as before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant