fix(ci): list plugin.sh in build.by so the image build can find it

CNB only puts the files named in `build.by` into the build context of a
`docker.build` environment image, and silently omits everything else
rather than failing. The kaniko image's `COPY .ci/kaniko/plugin.sh` was
therefore reading from an empty "client dir", which is why the build
failed with `"/.ci/kaniko/plugin.sh": not found` while the file is very
much in the repository.

The Dockerfile itself is exempt from the filter, so `dockerfile:` alone
had looked sufficient.

Ref: #16
This commit is contained in:
cnb.dQC5J6ohAGA committed 2026-09-17 09:53:32 +08:00
1 parent 4037a7f082
commit 666a1c29f9
1 file changed
+4
+4
View File
@@ -112,6 +112,10 @@ main:
docker:
build:
dockerfile: .ci/kaniko/Dockerfile
# CNB 只把 `by` 里列出的文件放进构建上下文,`plugin.sh` 不在列的话
# 并不会报错,只是 Dockerfile 里那句 COPY 找不到文件。
by:
- .ci/kaniko/plugin.sh
stages:
- name: login
script: |