Skip to content

CI: условия этапов проверяются до выделения агента - #1757

Merged
EvilBeaver merged 1 commit into
EvilBeaver:developfrom
sfaqer:ci/before-agent
Sep 27, 2026
Merged

EvilBeaver merged 1 commit into
EvilBeaver:developfrom
sfaqer:ci/before-agent

Conversation

@sfaqer

@sfaqer sfaqer commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Jenkins проверял when уже после выделения агента, поэтому пропускаемые этапы все равно занимали агент, а Publishing artifacts to clouds, Build v1 и Build v2 еще и клонировали репозиторий. Обычно это секунды, но когда клонирование тормозит, пропускаемый этап держит агент или валит сборку. В develop #22 образ собрался, а сборка красная из-за Build v1, который на develop не выполняется: клонирование упало по таймауту через 10 минут. В develop #13 пропущенный Publishing artifacts to clouds занимал windows-server 10 минут.

С beforeAgent true условие проверяется до выделения агента. Условия зависят только от ветки и тега, агент для них не нужен.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Publishing stages now check branch and tag conditions before allocating a build agent. This changes when those checks occur in the publishing process; no user-facing product changes are included.

Пропускаемые этапы сначала занимали агент и клонировали репозиторий,
а потом проверяли when. Когда клонирование тормозит, такой этап держит
агент или валит сборку: в develop EvilBeaver#22 упал Build v1, который на develop
не выполняется. С beforeAgent true агент берется, только если этап
будет выполняться.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 1c228f5b-0f30-4b14-b66c-91b170a23b1e

📥 Commits

Reviewing files that changed from the base of the PR and between 38953db and 995e4df.

📒 Files selected for processing (1)
  • Jenkinsfile

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

Six Jenkins publishing and build stages now evaluate their branch or tag conditions before allocating an agent.

Changes

Publishing stage conditions

Layer / File(s) Summary
Evaluate stage conditions before agent allocation
Jenkinsfile
The Publishing night-build, Publishing preview, Publishing latest, Publishing artifacts to clouds, Build v1, and Build v2 stages now evaluate their branch or tag conditions before allocating an agent.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: evilbeaver

Merge Risk: ⚪ Minimal · up to 995e4

The six branch/tag checks run before agent allocation, avoiding wasted agent time for skipped stages. No concrete regression is indicated, so the change appears ready for normal CI.

Architecture Summary

Architecture risk: 🔵 Low · up to 995e4

The change affects 1 system.

Changed systems: Jenkinsfile

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — Jenkinsfile (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in Jenkinsfile: The Publishing night-build branch condition is now evaluated before Jenkins allocates the stage agent.
  • observed — Modified behavior in Jenkinsfile: The Publishing preview branch condition is now evaluated before Jenkins allocates the stage agent.
  • observed — Modified behavior in Jenkinsfile: The Publishing latest branch condition is now evaluated before Jenkins allocates the stage agent.
  • observed — Modified behavior in Jenkinsfile: The Publishing artifacts to clouds branch condition is now evaluated before Jenkins allocates the stage agent.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: Jenkins evaluates stage conditions before allocating an agent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@EvilBeaver
EvilBeaver merged commit 0a915a0 into EvilBeaver:develop Sep 27, 2026
1 of 2 checks passed
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.

2 participants