diff --git a/.drone.yml b/.drone.yml index 999924a..9523981 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ --- kind: pipeline type: kubernetes -name: ansible-containers +name: build-debian platform: os: linux @@ -73,48 +73,6 @@ steps: - push - pull_request -- 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 - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 - when: - event: - - push - - pull_request - -- name: build-alpine-3 - image: plugins/kaniko - settings: - dockerfile: alpine-3/Dockerfile - password: - from_secret: docker_password - username: - from_secret: docker_username - repo: lerentis/ansible - tags: - - alpine-3-dev - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 - when: - event: - - push - - pull_request - - name: build-debian-8 image: plugins/kaniko settings: @@ -126,11 +84,6 @@ steps: repo: lerentis/ansible tags: - debian-8-dev - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 when: event: - push @@ -147,11 +100,6 @@ steps: repo: lerentis/ansible tags: - debian-9-dev - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 when: event: - push @@ -168,11 +116,33 @@ steps: repo: lerentis/ansible tags: - debian-10-dev - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 + when: + event: + - push + - pull_request + +--- +kind: pipeline +type: kubernetes +name: build-rhel + +platform: + os: linux + arch: amd64 + +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 @@ -189,11 +159,6 @@ steps: repo: lerentis/ansible tags: - centos-8-dev - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 when: event: - push @@ -210,16 +175,49 @@ steps: repo: lerentis/ansible tags: - centos-7-dev - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 when: event: - push - pull_request +--- +kind: pipeline +type: kubernetes +name: build-alpine + +platform: + os: linux + arch: amd64 + +steps: + +- name: build-alpine-3 + image: plugins/kaniko + settings: + dockerfile: alpine-3/Dockerfile + password: + from_secret: docker_password + username: + from_secret: docker_username + repo: lerentis/ansible + tags: + - alpine-3-dev + when: + event: + - push + - pull_request + +--- +kind: pipeline +type: kubernetes +name: build-arch + +platform: + os: linux + arch: amd64 + +steps: + - name: build-arch image: plugins/kaniko settings: @@ -231,16 +229,22 @@ steps: repo: lerentis/ansible tags: - arch-dev - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 when: event: - push - pull_request +--- +kind: pipeline +type: kubernetes +name: release-debian + +platform: + os: linux + arch: amd64 + +steps: + - name: build-ubuntu-20-release image: plugins/kaniko settings: @@ -301,36 +305,6 @@ steps: event: - tag -- 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 - -- name: build-alpine-3-release - image: plugins/kaniko - settings: - dockerfile: alpine-3/Dockerfile - password: - from_secret: docker_password - username: - from_secret: docker_username - repo: lerentis/ansible - tags: - - alpine-3 - when: - event: - - tag - - name: build-debian-8-release image: plugins/kaniko settings: @@ -376,6 +350,32 @@ steps: event: - tag +--- +kind: pipeline +type: kubernetes +name: release-rhel + +platform: + os: linux + arch: amd64 + +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 + - name: build-centos-8-release image: plugins/kaniko settings: @@ -406,6 +406,43 @@ steps: event: - tag +--- +kind: pipeline +type: kubernetes +name: release-alpine + +platform: + os: linux + arch: amd64 + +steps: + +- name: build-alpine-3-release + image: plugins/kaniko + settings: + dockerfile: alpine-3/Dockerfile + password: + from_secret: docker_password + username: + from_secret: docker_username + repo: lerentis/ansible + tags: + - alpine-3 + when: + event: + - tag + +--- +kind: pipeline +type: kubernetes +name: release-arch + +platform: + os: linux + arch: amd64 + +steps: + - name: build-arch-release image: plugins/kaniko settings: @@ -422,6 +459,17 @@ steps: - tag +--- +kind: pipeline +type: kubernetes +name: notify-build + +platform: + os: linux + arch: amd64 + +steps: + - name: notify image: appleboy/drone-telegram settings: @@ -432,16 +480,35 @@ steps: status: - failure - success - depends_on: - - build-ubuntu-20 - - build-ubuntu-18 - - build-ubuntu-16 - - build-ubuntu-14 - - build-fedora-24 - - build-alpine-3 - - build-debian-8 - - build-debian-9 - - build-debian-10 - - build-centos-7 - - build-centos-8 +depends_on: - build-arch + - build-alpine + - build-debian + - build-rhel + +--- +kind: pipeline +type: kubernetes +name: notify-release + +platform: + os: linux + arch: amd64 + +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 + when: + status: + - failure + - success +depends_on: + - release-arch + - release-alpine + - release-debian + - release-rhel \ No newline at end of file