diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..8a6671a --- /dev/null +++ b/.drone.yml @@ -0,0 +1,27 @@ +--- +# ---------------------------------------------- +# -- Build the site and push it to the registry +# ---------------------------------------------- +kind: pipeline +type: kubernetes +name: Build badhouseplants.net + +trigger: + event: + - push + +steps: + - name: Prepare the builder image + image: alpine + privileged: true + environment: + GITEA_TOKEN: + from_secret: GITEA_TOKEN + BUILDAH_REG: git.badhouseplants.net/badhouseplants/badhouseplants-builder + commands: + - apk update + - apk add buildah cni-plugins iptables ip6tables + - buildah login -u allanger -p $GITEA_TOKEN git.badhouseplants.net + - buildah build -t $BUILDAH_REG:$DRONE_COMMIT_SHA -f Dockerfile-builder . + - buildah push $BUILDAH_REG:$DRONE_COMMIT_SHA + diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..e6075c9 --- /dev/null +++ b/Containerfile @@ -0,0 +1,19 @@ +FROM registry.hub.docker.com/rclone/rclone AS rclone +WORKDIR /out +RUN cp $(which rclone) /out/rclone + +FROM registry.hub.docker.com/argoproj/argocd as argocd +WORKDIR /out +RUN cp $(which argocd) /out/argocd + +FROM registry.hub.docker.com/alpine/k8s:1.24.10 as kubectl +WORKDIR /out +RUN cp $(which kubectl) /out/kubectl + + +FROM registry.hub.docker.com/library/alpine +RUN apk update --no-cache&&\ + apk add yq gettext openssl curl jq perl git --no-cache +COPY --from=rclone /out/rclone /usr/bin/rclone +COPY --from=argocd /out/argocd /usr/bin/argocd +COPY --from=kubectl /out/kubectl /usr/bin/kubectl \ No newline at end of file