From ef0c504e001cfe2f7f4416ac3edf7d61e20ab239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beatrice=20Dellac=C3=A0?= Date: Tue, 25 Mar 2025 02:54:35 +0100 Subject: [PATCH] add drone dev pipe --- .drone.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 4 +++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .drone.yaml diff --git a/.drone.yaml b/.drone.yaml new file mode 100644 index 000000000..c03c51771 --- /dev/null +++ b/.drone.yaml @@ -0,0 +1,45 @@ +kind: pipeline +name: default + +trigger: + event: + - push + +steps: + - name: docker-login + image: docker:20.10.16-dind + privileged: true + environment: + DOCKER_BUILDKIT: 1 + DOCKER_USERNAME: + from_secret: docker_username + DOCKER_PASSWORD: + from_secret: docker_password + commands: + - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin + + - name: create-builder + image: docker:20.10.16-dind + privileged: true + environment: + DOCKER_BUILDKIT: 1 + commands: + - docker buildx create --use --name multi-builder || docker buildx use multi-builder + + - name: bootstrap + image: docker:20.10.16-dind + privileged: true + environment: + DOCKER_BUILDKIT: 1 + commands: + - docker buildx inspect --bootstrap + + - name: build-push + image: docker:20.10.16-dind + privileged: true + environment: + DOCKER_BUILDKIT: 1 + DOCKER_USERNAME: + from_secret: docker_username + commands: + - docker buildx build --platform linux/amd64,linux/arm64 -t ${DOCKER_USERNAME}/deluge-openvpn:dev --push . \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 89604c07c..5f6f7be7c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,8 +26,10 @@ RUN arch=$(dpkg --print-architecture) && \ if [ "$arch" = "amd64" ]; then \ dpkg-deb -x /tmp/dumb-init /tmp/dumb-init-dir && \ cp /tmp/dumb-init-dir/usr/bin/dumb-init /usr/local/bin/dumb-init; \ - else \ + elif [ "$arch" = "amd64" ]; then \ cp /tmp/dumb-init /usr/local/bin/dumb-init; \ + else \ + echo "Unsupported architecture: $arch" && exit 1; \ fi && \ chmod +x /usr/local/bin/dumb-init && \ rm -rf /tmp/dumb-init /tmp/dumb-init-dir