Compare commits

...

10 Commits

3 changed files with 22 additions and 10 deletions

View File

@ -4,7 +4,7 @@ steps:
image: woodpeckerci/plugin-kaniko
settings:
registry: harbor.dvirlabs.com
repo: devtools/wp-kaniko-sync
repo: dev-tools/wp-kaniko-sync
dockerfile: Dockerfile
context: .
tags:

View File

@ -1,14 +1,26 @@
FROM alpine:3.19
# שלב 1: בניית כלים
FROM alpine:3.19 as builder
# כלים: git, yq, curl לבניית Kaniko
RUN apk add --no-cache bash git yq curl
# התקנת Kaniko
RUN mkdir -p /kaniko && \
curl -sSL -o /kaniko/executor https://github.com/GoogleContainerTools/kaniko/releases/download/v1.21.0/executor && \
chmod +x /kaniko/executor
# הורדת Kaniko בינארי
RUN curl -sSL -o /kaniko \
https://github.com/GoogleContainerTools/kaniko/releases/download/v1.20.1/executor && \
chmod +x /kaniko
ENV PATH="/kaniko:$PATH"
# שלב 2: בניית פלאגין סופי על בסיס woodpeckerci/plugin-kaniko
FROM woodpeckerci/plugin-kaniko:latest
USER root
# העתקת הכלים מה-builder
COPY --from=builder /kaniko /usr/local/bin/kaniko
COPY --from=builder /bin/bash /bin/bash
COPY --from=builder /usr/bin/git /usr/bin/git
COPY --from=builder /usr/bin/yq /usr/bin/yq
COPY --from=builder /usr/bin/curl /usr/bin/curl
ENV PATH="/usr/local/bin:$PATH"
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

View File

@ -7,7 +7,7 @@ TAG="${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:7}"
echo "🧩 Using tag: $TAG"
echo "🔨 Building Docker image for ${PLUGIN_CONTEXT}"
/kaniko/executor \
kaniko \
--dockerfile="${PLUGIN_DOCKERFILE}" \
--context="${PLUGIN_CONTEXT}" \
--destination="${PLUGIN_REGISTRY}/${PLUGIN_REPO}:${TAG}" \