Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
cce376cc4b | |||
f719b7ade3 | |||
66b678830e | |||
641bd93f93 | |||
9c948d5788 | |||
f15e77fb88 | |||
12fe4cf41a | |||
39c7266b49 | |||
e854da83ca | |||
61bcffed6a | |||
d07b70a09f | |||
d6a66a4e8f | |||
d661d20093 |
@ -1,44 +0,0 @@
|
||||
local Pipeline(tag) = {
|
||||
kind: "pipeline",
|
||||
type: "kubernetes",
|
||||
name: tag + "build",
|
||||
platform: {
|
||||
os: "linux",
|
||||
arch: "amd64",
|
||||
},
|
||||
steps: [
|
||||
{
|
||||
name: tag,
|
||||
image: "plugins/kaniko",
|
||||
settings: {
|
||||
repo: "lerentis/ansible",
|
||||
username: { "from_secret": "docker_username" },
|
||||
password: { "from_secret": "docker_password" },
|
||||
dockerfile: tag + "/Dockerfile",
|
||||
tags: [ tag ],
|
||||
},
|
||||
resources: {
|
||||
limits: {
|
||||
cpu: "200",
|
||||
memory: "1024MiB",
|
||||
},
|
||||
},
|
||||
when: [ "push", "pull_request", "cron" ]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
[
|
||||
Pipeline("ubuntu-20.04"),
|
||||
Pipeline("ubuntu-18.04"),
|
||||
Pipeline("ubuntu-14.04"),
|
||||
Pipeline("debian-8"),
|
||||
Pipeline("debian-9"),
|
||||
Pipeline("debian-10"),
|
||||
Pipeline("centos-7"),
|
||||
Pipeline("almalinux-8"),
|
||||
Pipeline("fedora-24"),
|
||||
Pipeline("alpine-3"),
|
||||
Pipeline("arch"),
|
||||
]
|
55
.drone.star
Normal file
55
.drone.star
Normal 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
|
||||
}
|
335
.drone.yml
335
.drone.yml
@ -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
|
||||
@ -30,7 +51,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-ubuntu-18
|
||||
- name: build-ubuntu-18.04
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: ubuntu-18.04/Dockerfile
|
||||
@ -51,7 +72,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-ubuntu-16
|
||||
- name: build-ubuntu-16.04
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: ubuntu-16.04/Dockerfile
|
||||
@ -72,7 +93,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-ubuntu-14
|
||||
- name: build-ubuntu-14.04
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: ubuntu-14.04/Dockerfile
|
||||
@ -167,27 +188,6 @@ platform:
|
||||
|
||||
steps:
|
||||
|
||||
- name: build-fedora-24
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: fedora-24/Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
username:
|
||||
from_secret: docker_username
|
||||
repo: lerentis/ansible
|
||||
tags:
|
||||
- fedora-24-dev
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
- cron
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-almalinux-8
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
@ -230,6 +230,90 @@ steps:
|
||||
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
|
||||
type: kubernetes
|
||||
@ -241,17 +325,38 @@ 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
|
||||
@ -294,6 +399,8 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
@ -305,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
|
||||
@ -324,7 +450,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-ubuntu-18-release
|
||||
- name: release-ubuntu-18.04
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: ubuntu-18.04/Dockerfile
|
||||
@ -343,7 +469,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-ubuntu-16-release
|
||||
- name: release-ubuntu-16.04
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: ubuntu-16.04/Dockerfile
|
||||
@ -362,7 +488,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-ubuntu-14-release
|
||||
- name: release-ubuntu-14.04
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: ubuntu-14.04/Dockerfile
|
||||
@ -381,7 +507,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-debian-8-release
|
||||
- name: release-debian-8
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: debian-8/Dockerfile
|
||||
@ -400,7 +526,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-debian-9-release
|
||||
- name: release-debian-9
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: debian-9/Dockerfile
|
||||
@ -419,7 +545,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-debian-10-release
|
||||
- name: release-debian-10
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: debian-10/Dockerfile
|
||||
@ -438,6 +564,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
@ -449,26 +576,7 @@ platform:
|
||||
|
||||
steps:
|
||||
|
||||
- name: build-fedora-24-release
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: fedora-24/Dockerfile
|
||||
password:
|
||||
from_secret: docker_password
|
||||
username:
|
||||
from_secret: docker_username
|
||||
repo: lerentis/ansible
|
||||
tags:
|
||||
- fedora-24
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-almalinux-8-release
|
||||
- name: release-almalinux-8
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: almalinux-8/Dockerfile
|
||||
@ -487,7 +595,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
- name: build-centos-7-release
|
||||
- name: release-centos-7
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: centos-7/Dockerfile
|
||||
@ -506,6 +614,83 @@ steps:
|
||||
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
|
||||
type: kubernetes
|
||||
@ -517,17 +702,17 @@ 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
|
||||
@ -536,6 +721,26 @@ steps:
|
||||
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
|
||||
type: kubernetes
|
||||
@ -547,7 +752,7 @@ platform:
|
||||
|
||||
steps:
|
||||
|
||||
- name: build-arch-release
|
||||
- name: release-arch
|
||||
image: plugins/kaniko
|
||||
settings:
|
||||
dockerfile: arch/Dockerfile
|
||||
@ -566,6 +771,7 @@ steps:
|
||||
cpu: 200
|
||||
memory: 1024MiB
|
||||
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: kubernetes
|
||||
@ -594,10 +800,10 @@ steps:
|
||||
- pull_request
|
||||
- cron
|
||||
depends_on:
|
||||
- build-arch
|
||||
- build-alpine
|
||||
- build-debian
|
||||
- build-rhel
|
||||
- build-alpine
|
||||
- build-arch
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
@ -624,9 +830,8 @@ steps:
|
||||
- success
|
||||
event:
|
||||
- tag
|
||||
|
||||
depends_on:
|
||||
- release-arch
|
||||
- release-alpine
|
||||
- release-debian
|
||||
- release-rhel
|
||||
- release-alpine
|
||||
- release-arch
|
||||
|
11
README.md
11
README.md
@ -8,14 +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-20.04
|
||||
* ubuntu-22.04
|
||||
* arch
|
||||
|
||||
## run playbooks
|
||||
@ -72,4 +77,4 @@ Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't wo
|
||||
|
||||
* [project](https://git.uploadfilter24.eu/lerentis/ansible)
|
||||
|
||||
Current Version: 0.7.2
|
||||
Current Version: 2.0
|
||||
|
7
alpine-3.15/Dockerfile
Normal file
7
alpine-3.15/Dockerfile
Normal 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"]
|
27
build-all.sh
27
build-all.sh
@ -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 ../almalinux-8 && docker buildx build -t lerentis/ansible:almalinux-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
123
drone.yaml.j2
Normal 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 %}
|
@ -1,4 +1,4 @@
|
||||
FROM fedora:24
|
||||
FROM fedora:34
|
||||
|
||||
RUN dnf -y install \
|
||||
ansible \
|
11
fedora-35/Dockerfile
Normal file
11
fedora-35/Dockerfile
Normal 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
11
fedora-36/Dockerfile
Normal 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
11
fedora-37/Dockerfile
Normal 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
52
generate-pipeline.py
Normal 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
16
ubuntu-22.04/Dockerfile
Normal 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"]
|
Loading…
Reference in New Issue
Block a user