Compare commits
No commits in common. "44a3d313019482a027decca0edf199862948c214" and "d3a820eb1f6e0f0ecd54298063ae1239af45c000" have entirely different histories.
44a3d31301
...
d3a820eb1f
@ -4,7 +4,7 @@ steps:
|
|||||||
image: woodpeckerci/plugin-kaniko
|
image: woodpeckerci/plugin-kaniko
|
||||||
settings:
|
settings:
|
||||||
registry: harbor.dvirlabs.com
|
registry: harbor.dvirlabs.com
|
||||||
repo: dev-tools/wp-kaniko-sync
|
repo: devtools/wp-kaniko-sync
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
28
Dockerfile
28
Dockerfile
@ -1,28 +1,16 @@
|
|||||||
# שלב 1: בניית כלים
|
FROM alpine:3.19
|
||||||
FROM alpine:3.19 as builder
|
|
||||||
|
|
||||||
|
# כלים: git, yq, curl לבניית Kaniko
|
||||||
RUN apk add --no-cache bash git yq curl
|
RUN apk add --no-cache bash git yq curl
|
||||||
|
|
||||||
# הורדת Kaniko בינארי
|
# התקנת Kaniko
|
||||||
RUN curl -sSL -o /kaniko \
|
RUN mkdir -p /kaniko && \
|
||||||
https://github.com/GoogleContainerTools/kaniko/releases/download/v1.20.1/executor && \
|
curl -sSL -o /kaniko/executor https://github.com/GoogleContainerTools/kaniko/releases/download/v1.21.0/executor && \
|
||||||
chmod +x /kaniko
|
chmod +x /kaniko/executor
|
||||||
|
|
||||||
# שלב 2: בניית פלאגין סופי על בסיס woodpeckerci/plugin-kaniko
|
ENV PATH="/kaniko:$PATH"
|
||||||
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
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
@ -7,7 +7,7 @@ TAG="${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:7}"
|
|||||||
echo "🧩 Using tag: $TAG"
|
echo "🧩 Using tag: $TAG"
|
||||||
|
|
||||||
echo "🔨 Building Docker image for ${PLUGIN_CONTEXT}"
|
echo "🔨 Building Docker image for ${PLUGIN_CONTEXT}"
|
||||||
kaniko \
|
/kaniko/executor \
|
||||||
--dockerfile="${PLUGIN_DOCKERFILE}" \
|
--dockerfile="${PLUGIN_DOCKERFILE}" \
|
||||||
--context="${PLUGIN_CONTEXT}" \
|
--context="${PLUGIN_CONTEXT}" \
|
||||||
--destination="${PLUGIN_REGISTRY}/${PLUGIN_REPO}:${TAG}" \
|
--destination="${PLUGIN_REGISTRY}/${PLUGIN_REPO}:${TAG}" \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user