Compare commits

...

25 Commits
1.4 ... master

Author SHA1 Message Date
Tobias Trabelsi cce376cc4b
dont release dev tags tho
continuous-integration/drone/push Build is passing Details
2022-04-23 19:12:13 +02:00
Tobias Trabelsi f719b7ade3
fuck starlark and jsonet. jinja it is
continuous-integration/drone/push Build was killed Details
2022-04-23 19:06:25 +02:00
Tobias Trabelsi 66b678830e
refactored pipeline to use anchores
continuous-integration/drone/push Build is passing Details
2022-04-23 18:25:53 +02:00
lerentis 641bd93f93 Update 'README.md'
continuous-integration/drone/push Build is passing Details
2022-04-20 19:03:16 +00:00
Tobias Trabelsi 9c948d5788
prepare release
continuous-integration/drone/push Build was killed Details
continuous-integration/drone/tag Build is passing Details
continuous-integration/drone Build is passing Details
2022-04-20 20:21:39 +02:00
Tobias Trabelsi f15e77fb88
fixed ubuntu 22.04 python apt package name
continuous-integration/drone/push Build was killed Details
2022-04-20 19:42:30 +02:00
Tobias Trabelsi 12fe4cf41a
and better alpine support 2022-04-20 19:41:18 +02:00
Tobias Trabelsi 39c7266b49
some more rhel family love 2022-04-20 19:38:19 +02:00
Tobias Trabelsi e854da83ca
added support for ubuntu 22.04
continuous-integration/drone/push Build is failing Details
2022-04-20 19:32:06 +02:00
lerentis 61bcffed6a Update '.drone.yml'
continuous-integration/drone/push Build is passing Details
2022-03-28 20:49:45 +00:00
Tobias Trabelsi d07b70a09f
trigger build
continuous-integration/drone/push Build is passing Details
2022-02-15 22:33:11 +01:00
Tobias Trabelsi d6a66a4e8f
cpu limit as digit 2022-02-15 22:31:59 +01:00
Tobias Trabelsi d661d20093
trigger build 2022-02-15 22:31:11 +01:00
Tobias Trabelsi da6b0189ce
welp drones jsonnet support does seem to lack a few things
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is failing Details
2022-02-13 19:40:16 +01:00
Tobias Trabelsi fb3a10a4d3
converted pipeline with jsonnet 2022-02-13 19:30:33 +01:00
Tobias Trabelsi 9245bc02a6
increased limits
continuous-integration/drone/push Build is passing Details
2022-02-13 18:29:55 +01:00
Tobias Trabelsi 974e29e405
LIMITS
continuous-integration/drone/push Build was killed Details
2022-02-10 16:25:01 +01:00
Tobias Trabelsi 5c06f04f69
removed centos 8 in favor of almalinux
continuous-integration/drone/push Build is passing Details
2022-02-10 15:53:05 +01:00
Tobias Trabelsi c2252c72f0
drone yaml
continuous-integration/drone/push Build is passing Details
2021-11-07 17:54:53 +01:00
Tobias Trabelsi 6bf134506d
added cron to event list
continuous-integration/drone/push Build is passing Details
2021-10-17 21:15:58 +02:00
Tobias Trabelsi 8bafe97a18
Merge branch 'master' of git.uploadfilter24.eu:lerentis/ansible
continuous-integration/drone/push Build is passing Details
2021-10-05 22:24:03 +02:00
Tobias Trabelsi 3728e4d4d2
fixed build badge 2021-10-05 22:23:42 +02:00
lerentis d4b71fcddc [CI SKIP] updated readme 2021-10-02 17:01:42 +00:00
Tobias Trabelsi 29a5ac9221
better message for none release
continuous-integration/drone/push Build is passing Details
2021-10-02 18:56:41 +02:00
Tobias Trabelsi f6128fe7cf
better message on release
continuous-integration/drone/push Build is passing Details
2021-10-02 18:42:30 +02:00
14 changed files with 708 additions and 95 deletions

55
.drone.star Normal file
View File

@ -0,0 +1,55 @@
def main(ctx):
return [
pipeline("debian", ["ubuntu-22.04", "ubuntu-20.04"]),
pipeline("rhel", ["fedora-34", "fedora-35"]),
]
def generateStep(tag):
return {
"name": "build-" + tag,
"image": "plugins/kaniko",
"settings": {
"dockerfile": tag + "/Dockerfile",
"password": {
"from_secret": "docker_password"
},
"username": {
"from_secret": "docker_username"
},
"repo": "lerentis/ansible",
"tags": [
tag
]
},
"when": {
"event": [
"push",
"pull_request",
"cron"
]
},
"ressources": {
"limits": {
"cpu": "200",
"memory": "1024MiB"
}
}
}
def pipeline(group, tags):
steps = []
for tag in tags:
steps += generateStep(tag)
print(generateStep(tag))
print(steps)
return {
"kind": "pipeline",
"type": "kubernetes",
"name": "build-%s" % group,
"platform": {
"os": "linux",
"arch": "amd64"
},
"steps": steps
}

View File

@ -9,7 +9,28 @@ platform:
steps:
- name: build-ubuntu-20
- name: build-ubuntu-22.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-22.04/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- ubuntu-22.04-dev
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-20.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-20.04/Dockerfile
@ -24,8 +45,13 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-18
- name: build-ubuntu-18.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-18.04/Dockerfile
@ -40,8 +66,13 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-16
- name: build-ubuntu-16.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-16.04/Dockerfile
@ -56,8 +87,13 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-14
- name: build-ubuntu-14.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-14.04/Dockerfile
@ -72,6 +108,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-8
image: plugins/kaniko
@ -88,6 +129,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-9
image: plugins/kaniko
@ -104,6 +150,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-10
image: plugins/kaniko
@ -120,6 +171,11 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -132,37 +188,26 @@ platform:
steps:
- name: build-fedora-24
- name: build-almalinux-8
image: plugins/kaniko
settings:
dockerfile: fedora-24/Dockerfile
dockerfile: almalinux-8/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-24-dev
when:
event:
- push
- pull_request
- name: build-centos-8
image: plugins/kaniko
settings:
dockerfile: centos-8/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- centos-8-dev
- almalinux-8-dev
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-centos-7
image: plugins/kaniko
@ -179,6 +224,95 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-34
image: plugins/kaniko
settings:
dockerfile: fedora-34/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-34-dev
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-35
image: plugins/kaniko
settings:
dockerfile: fedora-35/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-35-dev
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-36
image: plugins/kaniko
settings:
dockerfile: fedora-36/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-36-dev
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-fedora-37
image: plugins/kaniko
settings:
dockerfile: fedora-37/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-37-dev
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -191,21 +325,47 @@ platform:
steps:
- name: build-alpine-3
- name: build-alpine-3.14
image: plugins/kaniko
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
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
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -233,6 +393,13 @@ steps:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -245,7 +412,26 @@ platform:
steps:
- name: build-ubuntu-20-release
- name: release-ubuntu-22.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-22.04/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- ubuntu-22.04
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: release-ubuntu-20.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-20.04/Dockerfile
@ -259,8 +445,12 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-18-release
- name: release-ubuntu-18.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-18.04/Dockerfile
@ -274,8 +464,12 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-16-release
- name: release-ubuntu-16.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-16.04/Dockerfile
@ -289,8 +483,12 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-ubuntu-14-release
- name: release-ubuntu-14.04
image: plugins/kaniko
settings:
dockerfile: ubuntu-14.04/Dockerfile
@ -304,8 +502,12 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-8-release
- name: release-debian-8
image: plugins/kaniko
settings:
dockerfile: debian-8/Dockerfile
@ -319,8 +521,12 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-9-release
- name: release-debian-9
image: plugins/kaniko
settings:
dockerfile: debian-9/Dockerfile
@ -334,8 +540,12 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-debian-10-release
- name: release-debian-10
image: plugins/kaniko
settings:
dockerfile: debian-10/Dockerfile
@ -349,6 +559,11 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -361,37 +576,26 @@ platform:
steps:
- name: build-fedora-24-release
- name: release-almalinux-8
image: plugins/kaniko
settings:
dockerfile: fedora-24/Dockerfile
dockerfile: almalinux-8/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-24
- almalinux-8
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: build-centos-8-release
image: plugins/kaniko
settings:
dockerfile: centos-8/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- centos-8
when:
event:
- tag
- name: build-centos-7-release
- name: release-centos-7
image: plugins/kaniko
settings:
dockerfile: centos-7/Dockerfile
@ -405,6 +609,87 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: release-fedora-34
image: plugins/kaniko
settings:
dockerfile: fedora-34/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-34
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: release-fedora-35
image: plugins/kaniko
settings:
dockerfile: fedora-35/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-35
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: release-fedora-36
image: plugins/kaniko
settings:
dockerfile: fedora-36/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-36
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
- name: release-fedora-37
image: plugins/kaniko
settings:
dockerfile: fedora-37/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- fedora-37
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -417,20 +702,44 @@ platform:
steps:
- name: build-alpine-3-release
- name: release-alpine-3.14
image: plugins/kaniko
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: release-alpine-3.15
image: plugins/kaniko
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
resources:
limits:
cpu: 200
memory: 1024MiB
---
kind: pipeline
@ -443,7 +752,7 @@ platform:
steps:
- name: build-arch-release
- name: release-arch
image: plugins/kaniko
settings:
dockerfile: arch/Dockerfile
@ -457,6 +766,10 @@ steps:
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
---
@ -473,9 +786,11 @@ steps:
- name: notify
image: appleboy/drone-telegram
settings:
message: "Commit {{ commit.link }} ran with build {{ build.number }} and finished with status {{ build.status }}."
to: 14852963
token: 335668211:AAF-YgId7iI6ANBuZVy4uVOYYqA4R4uAaqY
message: "Commit {{ commit.message }} ran with build {{ build.number }} and finished with status {{ build.status }}."
to:
from_secret: telegram_userid
token:
from_secret: telegram_secret
when:
status:
- failure
@ -483,11 +798,12 @@ steps:
event:
- push
- pull_request
depends_on:
- build-arch
- build-alpine
- build-debian
- build-rhel
- cron
depends_on:
- build-debian
- build-rhel
- build-alpine
- build-arch
---
kind: pipeline
@ -503,18 +819,19 @@ steps:
- name: notify
image: appleboy/drone-telegram
settings:
message: "Commit {{ commit.link }} ran with build {{ build.number }} and finished with status {{ build.status }}."
to: 14852963
token: 335668211:AAF-YgId7iI6ANBuZVy4uVOYYqA4R4uAaqY
message: "Release {{ build.tag }} ran with build {{ build.number }} and finished with status {{ build.status }}."
to:
from_secret: telegram_userid
token:
from_secret: telegram_secret
when:
status:
- failure
- success
event:
- tag
- tag
depends_on:
- release-arch
- release-alpine
- release-debian
- release-rhel
- release-debian
- release-rhel
- release-alpine
- release-arch

View File

@ -1,6 +1,6 @@
# ansible
[![Build Status](https://drone.burntbunch.org/api/badges/lerentis/ansible-container/status.svg)](https://drone.burntbunch.org/lerentis/ansible-container)
[![Build Status](https://drone.uploadfilter24.eu/api/badges/lerentis/ansible/status.svg)](https://drone.uploadfilter24.eu/lerentis/ansible)
Docker images for running and testing ansible playbooks with various operating systems.
This Project is based on this [project](https://github.com/pauvos/ansible), which seems abandoned
@ -8,13 +8,19 @@ I don't like obfuscated Dockerfiles with external scripts and hundreds of bells
Available operating systems:
* alpine-3
* alpine-3.14
* alpine-3.15
* centos-7
* almalinux-8
* debian-8
* fedora-24
* fedora-34
* fedora-35
* fedora-36
* fedora-37
* ubuntu-16.04
* ubuntu-18.04
* ubuntu-19.04
* ubuntu-20.04
* ubuntu-22.04
* arch
## run playbooks
@ -69,6 +75,6 @@ Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't wo
## references
* [project](https://git.burntbunch.org/lerentis/ansible-container)
* [project](https://git.uploadfilter24.eu/lerentis/ansible)
Current Version: 0.7.2
Current Version: 2.0

View File

@ -1,8 +1,7 @@
FROM centos:8
FROM almalinux:8
RUN dnf -y install python3-pip &&\
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&\
dnf install -y --enablerepo epel-playground ansible curl \
RUN dnf -y install python3-pip epel-release \
&& dnf install -y 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 \
&& touch ~/.netrc && chmod og-rw ~/.netrc \

7
alpine-3.15/Dockerfile Normal file
View File

@ -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"]

View File

@ -1,12 +1,17 @@
#!/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 ../ubuntu-20.04 && docker buildx build -t lerentis/ansible:ubuntu-20.04 --platform=linux/arm,linux/arm64,linux/amd64 . --push
cd ../fedora-24 && docker buildx build -t lerentis/ansible:fedora-24 --platform=linux/amd64 . --push
cd ../debian-9 && docker buildx build -t lerentis/ansible:debian-9 --platform=linux/arm,linux/amd64 . --push
cd ../debian-8 && docker buildx build -t lerentis/ansible:debian-8 --platform=linux/arm,linux/amd64 . --push
cd ../debian-10 && docker buildx build -t lerentis/ansible:debian-10 --platform=linux/arm64,linux/amd64 . --push
cd ../centos-7 && docker buildx build -t lerentis/ansible:centos-7 --platform=linux/arm64,linux/amd64 . --push
cd ../centos-8 && docker buildx build -t lerentis/ansible:centos-8 --platform=linux/arm64,linux/amd64 . --push
cd ../arch && docker buildx build -t lerentis/ansible:arch --platform=linux/arm,linux/amd64 . --push
cd ubuntu-18.04 && docker buildx build -t lerentis/ansible:ubuntu-18.04-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
cd ../ubuntu-16.04 && docker buildx build -t lerentis/ansible:ubuntu-16.04-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
cd ../alpine-3.14 && docker buildx build -t lerentis/ansible:alpine-3.14-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
cd ../alpine-3.15 && docker buildx build -t lerentis/ansible:alpine-3.15-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
cd ../ubuntu-20.04 && docker buildx build -t lerentis/ansible:ubuntu-20.04-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
cd ../ubuntu-22.04 && docker buildx build -t lerentis/ansible:ubuntu-22.04-dev --platform=linux/arm,linux/arm64,linux/amd64 . --push
cd ../fedora-34 && docker buildx build -t lerentis/ansible:fedora-34-dev --platform=linux/amd64 . --push
cd ../fedora-35 && docker buildx build -t lerentis/ansible:fedora-35-dev --platform=linux/amd64 . --push
cd ../fedora-36 && docker buildx build -t lerentis/ansible:fedora-36-dev --platform=linux/amd64 . --push
cd ../fedora-37 && docker buildx build -t lerentis/ansible:fedora-37-dev --platform=linux/amd64 . --push
cd ../debian-9 && docker buildx build -t lerentis/ansible:debian-9-dev --platform=linux/arm,linux/amd64 . --push
cd ../debian-8 && docker buildx build -t lerentis/ansible:debian-8-dev --platform=linux/arm,linux/amd64 . --push
cd ../debian-10 && docker buildx build -t lerentis/ansible:debian-10-dev --platform=linux/arm64,linux/amd64 . --push
cd ../centos-7 && docker buildx build -t lerentis/ansible:centos-7-dev --platform=linux/arm64,linux/amd64 . --push
cd ../almalinux-8 && docker buildx build -t lerentis/ansible:almalinux-8-dev --platform=linux/arm64,linux/amd64 . --push
cd ../arch && docker buildx build -t lerentis/ansible:arch-dev --platform=linux/arm,linux/amd64 . --push

123
drone.yaml.j2 Normal file
View File

@ -0,0 +1,123 @@
{%- for pipeline in pipelines -%}
---
kind: pipeline
type: kubernetes
name: build-{{ pipeline.group }}
platform:
os: linux
arch: amd64
steps:
{% for tag in pipeline.tags %}
- name: build-{{ tag }}
image: plugins/kaniko
settings:
dockerfile: {{ tag }}/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- {{ tag }}-dev
when:
event:
- push
- pull_request
- cron
resources:
limits:
cpu: 200
memory: 1024MiB
{% endfor %}
{% endfor %}
{% for pipeline in pipelines %}
---
kind: pipeline
type: kubernetes
name: release-{{ pipeline.group }}
platform:
os: linux
arch: amd64
steps:
{% for tag in pipeline.tags %}
- name: release-{{ tag }}
image: plugins/kaniko
settings:
dockerfile: {{ tag }}/Dockerfile
password:
from_secret: docker_password
username:
from_secret: docker_username
repo: lerentis/ansible
tags:
- {{ tag }}
when:
event:
- tag
resources:
limits:
cpu: 200
memory: 1024MiB
{% endfor %}
{% endfor %}
---
kind: pipeline
type: kubernetes
name: notify-build
platform:
os: linux
arch: amd64
steps:
{% raw %}
- name: notify
image: appleboy/drone-telegram
settings:
message: "Commit {{ commit.message }} ran with build {{ build.number }} and finished with status {{ build.status }}."
to:
from_secret: telegram_userid
token:
from_secret: telegram_secret
when:
status:
- failure
- success
event:
- push
- pull_request
- cron{% endraw %}
depends_on: {% for pipeline in pipelines %}
- build-{{ pipeline.group }} {% endfor %}
---
kind: pipeline
type: kubernetes
name: notify-release
platform:
os: linux
arch: amd64
steps:
{% raw %}
- name: notify
image: appleboy/drone-telegram
settings:
message: "Release {{ build.tag }} ran with build {{ build.number }} and finished with status {{ build.status }}."
to:
from_secret: telegram_userid
token:
from_secret: telegram_secret
when:
status:
- failure
- success
event:
- tag {% endraw %}
depends_on:{% for pipeline in pipelines %}
- release-{{ pipeline.group }} {% endfor %}

View File

@ -1,4 +1,4 @@
FROM fedora:24
FROM fedora:34
RUN dnf -y install \
ansible \

11
fedora-35/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM fedora:35
RUN dnf -y install \
ansible \
openssh-clients \
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 \
&& dnf clean all
CMD ["ansible-playbook", "--help"]

11
fedora-36/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM fedora:36
RUN dnf -y install \
ansible \
openssh-clients \
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 \
&& dnf clean all
CMD ["ansible-playbook", "--help"]

11
fedora-37/Dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM fedora:37
RUN dnf -y install \
ansible \
openssh-clients \
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 \
&& dnf clean all
CMD ["ansible-playbook", "--help"]

52
generate-pipeline.py Normal file
View File

@ -0,0 +1,52 @@
#!/usr/bin/env python3
from jinja2 import Template, Environment, FileSystemLoader
pipelines = [
{
"group": "debian",
"tags": [
"ubuntu-22.04",
"ubuntu-20.04",
"ubuntu-18.04",
"ubuntu-16.04",
"ubuntu-14.04",
"debian-8",
"debian-9",
"debian-10"
]
},
{
"group": "rhel",
"tags": [
"almalinux-8",
"centos-7",
"fedora-34",
"fedora-35",
"fedora-36",
"fedora-37"
]
},
{
"group": "alpine",
"tags": [
"alpine-3.14",
"alpine-3.15"
]
},
{
"group": "arch",
"tags": [
"arch"
]
}
]
file_loader = FileSystemLoader('.')
env = Environment(loader=file_loader)
template = env.get_template('drone.yaml.j2')
output = template.render(pipelines=pipelines)
print(output)

16
ubuntu-22.04/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
FROM ubuntu:22.04
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
software-properties-common \
apt-utils \
ansible \
python3-apt \
git-core \
openssh-client \
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 \
&& apt-get clean
CMD ["ansible-playbook", "--help"]