From 12fe4cf41a885bd0be82ce2a4c6740c16bc587ac Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Wed, 20 Apr 2022 19:41:18 +0200 Subject: [PATCH] and better alpine support --- .drone.yml | 52 ++++++++++++++++++++++++---- {alpine-3 => alpine-3.14}/Dockerfile | 0 alpine-3.15/Dockerfile | 7 ++++ build-all.sh | 3 +- 4 files changed, 55 insertions(+), 7 deletions(-) rename {alpine-3 => alpine-3.14}/Dockerfile (100%) create mode 100644 alpine-3.15/Dockerfile diff --git a/.drone.yml b/.drone.yml index a3c2eb5..c87868a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -325,17 +325,38 @@ platform: steps: -- name: build-alpine-3 +- name: build-alpine-3-14 image: plugins/kaniko:1.4.1 settings: - dockerfile: alpine-3/Dockerfile + dockerfile: alpine-3.14/Dockerfile password: from_secret: docker_password username: from_secret: docker_username repo: lerentis/ansible tags: - - alpine-3-dev + - alpine-3.14-dev + when: + event: + - push + - pull_request + - cron + resources: + limits: + cpu: 200 + memory: 1024MiB + +- name: build-alpine-3-15 + image: plugins/kaniko:1.4.1 + settings: + dockerfile: alpine-3.15/Dockerfile + password: + from_secret: docker_password + username: + from_secret: docker_username + repo: lerentis/ansible + tags: + - alpine-3.15-dev when: event: - push @@ -678,17 +699,36 @@ platform: steps: -- name: build-alpine-3-release +- name: build-alpine-3.14-release image: plugins/kaniko:1.4.1 settings: - dockerfile: alpine-3/Dockerfile + dockerfile: alpine-3.14/Dockerfile password: from_secret: docker_password username: from_secret: docker_username repo: lerentis/ansible tags: - - alpine-3 + - alpine-3.14 + when: + event: + - tag + resources: + limits: + cpu: 200 + memory: 1024MiB + +- name: build-alpine-3.15-release + image: plugins/kaniko:1.4.1 + settings: + dockerfile: alpine-3.15/Dockerfile + password: + from_secret: docker_password + username: + from_secret: docker_username + repo: lerentis/ansible + tags: + - alpine-3.15 when: event: - tag diff --git a/alpine-3/Dockerfile b/alpine-3.14/Dockerfile similarity index 100% rename from alpine-3/Dockerfile rename to alpine-3.14/Dockerfile diff --git a/alpine-3.15/Dockerfile b/alpine-3.15/Dockerfile new file mode 100644 index 0000000..59df192 --- /dev/null +++ b/alpine-3.15/Dockerfile @@ -0,0 +1,7 @@ +FROM alpine:3.15 + +RUN apk add --no-cache ansible curl \ + && curl -L https://github.com/aelsabbahy/goss/releases/latest/download/goss-linux-amd64 -o /usr/local/bin/goss \ + && chmod +rx /usr/local/bin/goss + +CMD ["ansible-playbook", "--help"] diff --git a/build-all.sh b/build-all.sh index 8d047b5..41edce7 100755 --- a/build-all.sh +++ b/build-all.sh @@ -1,7 +1,8 @@ #!/bin/bash cd ubuntu-18.04 && docker buildx build -t lerentis/ansible:ubuntu-18.04 --platform=linux/arm,linux/arm64,linux/amd64 . --push cd ../ubuntu-16.04 && docker buildx build -t lerentis/ansible:ubuntu-16.04 --platform=linux/arm,linux/arm64,linux/amd64 . --push -cd ../alpine-3 && docker buildx build -t lerentis/ansible:alpine-3 --platform=linux/arm,linux/arm64,linux/amd64 . --push +cd ../alpine-3.14 && docker buildx build -t lerentis/ansible:alpine-3.14 --platform=linux/arm,linux/arm64,linux/amd64 . --push +cd ../alpine-3.15 && docker buildx build -t lerentis/ansible:alpine-3.15 --platform=linux/arm,linux/arm64,linux/amd64 . --push cd ../ubuntu-20.04 && docker buildx build -t lerentis/ansible:ubuntu-20.04 --platform=linux/arm,linux/arm64,linux/amd64 . --push cd ../ubuntu-22.04 && docker buildx build -t lerentis/ansible:ubuntu-22.04 --platform=linux/arm,linux/arm64,linux/amd64 . --push cd ../fedora-34 && docker buildx build -t lerentis/ansible:fedora-34 --platform=linux/amd64 . --push