Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 44a3d31301 | |||
| fa0749ae81 | |||
| cb6d0705e5 | |||
| 7a8f9782c9 | |||
| 54409e935a | |||
| fe28512ee2 | |||
| 978320c84b | |||
| 6d2e92a81c | |||
| 0cdc65556a | |||
| e2d669be6a | |||
| 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: devtools/wp-kaniko-sync
|
repo: dev-tools/wp-kaniko-sync
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
context: .
|
context: .
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
26
Dockerfile
26
Dockerfile
@ -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
|
RUN apk add --no-cache bash git yq curl
|
||||||
|
|
||||||
# התקנת Kaniko
|
# הורדת Kaniko בינארי
|
||||||
RUN mkdir -p /kaniko && \
|
RUN curl -sSL -o /kaniko \
|
||||||
curl -sSL -o /kaniko/executor https://github.com/GoogleContainerTools/kaniko/releases/download/v1.21.0/executor && \
|
https://github.com/GoogleContainerTools/kaniko/releases/download/v1.20.1/executor && \
|
||||||
chmod +x /kaniko/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
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod +x /entrypoint.sh
|
RUN chmod +x /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/executor \
|
kaniko \
|
||||||
--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