Skip to content

Исправлена публикация docker-образов с неверной версией движка - #1743

Open
sfaqer wants to merge 1 commit into
EvilBeaver:developfrom
sfaqer:bugfix/docker-image-version
Open

sfaqer wants to merge 1 commit into
EvilBeaver:developfrom
sfaqer:bugfix/docker-image-version

Conversation

@sfaqer

@sfaqer sfaqer commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

publishDockerImage не передавал --build-arg VERSION, поэтому Dockerfile_v2 всегда ставил dev, а слой с ovm install брался из кэша агента. В итоге evilbeaver/onescript:2.2.0 и :dev содержат 2.2.0-dev+757 (лог #29, этап Build v2).

  • VERSION передаётся явно, к docker build добавлены --no-cache --pull
  • в Dockerfile_v1/v2 сборка падает, если oscript -version не совпадает с VERSION
  • v1 без VERSION ставил stable, т.е. 2.2.0: исправлено так же

Проверил локально: VERSION=2.2.0 даёт 2.2.0 и ТекущийПоток() работает, VERSION=dev даёт 2.3.0-dev+12.

После мержа нужно перепубликовать evilbeaver/onescript:2.2.0. В release/latest этого фикса пока нет, поэтому проще вручную:
docker build --pull --no-cache --build-arg VERSION=2.2.0 -t evilbeaver/onescript:2.2.0 -f install/builders/base-image/Dockerfile_v2 . && docker push evilbeaver/onescript:2.2.0

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Docker image builds now verify that the installed OneScript engine matches the requested version.
    • Builds fail with a clear error when a specific requested version is not installed correctly.
    • Version information is displayed during image creation for improved visibility.
  • Build Improvements

    • Images are rebuilt from the latest base layers without using cached build steps.
    • Version labels are automatically derived from release tags or selected engine channels.

publishDockerImage не передавал --build-arg VERSION, поэтому Dockerfile_v2
всегда ставил ovm install --fdd dev (а Dockerfile_v1 - stable). Слой с установкой
не менялся и брался из кэша агента: evilbeaver/onescript:2.2.0 и :dev содержат
2.2.0-dev+757.
Лог: https://build.oscript.io/job/1Script/job/release%252Flatest/29/ (этап Build v2, EvilBeaver#8 CACHED)

- VERSION передается явно: для v2 dev или номер релиза, для v1 lts или номер из тега
- docker build с --no-cache --pull
- в Dockerfile_v1/v2 сборка падает, если oscript -version не совпадает с VERSION

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Understand this PR’s impact

Explore downstream dependencies and potential security impact with Blast Radius.

View 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: fb425eb3-dad3-41da-9bad-5f93d18a27a1

📥 Commits

Reviewing files that changed from the base of the PR and between 95c879c and 4c25637.

📒 Files selected for processing (3)
  • Jenkinsfile
  • install/builders/base-image/Dockerfile_v1
  • install/builders/base-image/Dockerfile_v2

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The pipeline now passes an engine version to Docker builds. The base-image Dockerfiles log the installed OneScript version and validate numeric version requests.

Docker version validation

Layer / File(s) Summary
Pipeline version propagation
Jenkinsfile
Build v1 derives the version from TAG_NAME or uses lts. Build v2 passes codename. publishDockerImage passes VERSION and uses --pull and --no-cache.
Base-image version verification
install/builders/base-image/Dockerfile_v1, install/builders/base-image/Dockerfile_v2
Both Dockerfiles log oscript -version. Numeric VERSION values must match the installed version. Alias values skip comparison.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant Jenkinsfile
  participant publishDockerImage
  participant DockerBuild
  participant BaseImageDockerfile
  participant oscript
  Jenkinsfile->>publishDockerImage: provide engineVersion
  publishDockerImage->>DockerBuild: pass VERSION build argument
  DockerBuild->>BaseImageDockerfile: build with VERSION
  BaseImageDockerfile->>oscript: run oscript -version
  oscript-->>BaseImageDockerfile: return installed version
  BaseImageDockerfile-->>DockerBuild: fail if numeric VERSION mismatches
Loading

Suggested reviewers: evilbeaver

🚥 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 identifies the main change: correcting Docker image publication when the engine version is incorrect.
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.

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.

1 participant