From a39ea9e50b0e91260f5b7e7d523780a99786dde2 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Thu, 10 Oct 2024 21:15:00 +0200 Subject: [PATCH] woodpecker --- .drone.yml | 77 ---------------------------------------- .woodpecker/.build.yaml | 42 ++++++++++++++++++++++ .woodpecker/.deploy.yaml | 34 ++++++++++++++++++ 3 files changed, 76 insertions(+), 77 deletions(-) delete mode 100644 .drone.yml create mode 100644 .woodpecker/.build.yaml create mode 100644 .woodpecker/.deploy.yaml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 0621ecc..0000000 --- a/.drone.yml +++ /dev/null @@ -1,77 +0,0 @@ -kind: pipeline -name: deploy -steps: -- name: docker - image: plugins/docker - settings: - registry: git.ar21.de - username: - from_secret: REGISTRY_USER - password: - from_secret: REGISTRY_PASS - repo: git.ar21.de/secondhemd/shbot - tags: latest - when: - branch: - - master -- name: docker-build - image: plugins/docker - settings: - registry: git.ar21.de - username: - from_secret: REGISTRY_USER - password: - from_secret: REGISTRY_PASS - repo: git.ar21.de/secondhemd/shbot - tags: latest - dry_run: true - when: - branch: - exclude: - - master -- name: dev docker - image: plugins/docker - settings: - registry: git.ar21.de - username: - from_secret: REGISTRY_USER - password: - from_secret: REGISTRY_PASS - repo: git.ar21.de/secondhemd/shbot - tags: dev - when: - branch: - - dev -- name: deploy - image: appleboy/drone-ssh - settings: - host: - - s.ar21.de - username: root - key: - from_secret: DEPLOY_SSH_KEY - port: 22 - command_timeout: 2m - script: - - cd ~/compose/shbot && docker compose pull shbot && docker compose up -d shbot - when: - branch: - - master -- name: deploy dev - image: appleboy/drone-ssh - settings: - host: - - s.ar21.de - username: root - key: - from_secret: DEPLOY_SSH_KEY - port: 22 - command_timeout: 2m - script: - - cd /root && docker compose -f shbot-dev.yaml pull shbot-dev && docker compose -f shbot-dev.yaml up -d shbot-dev - when: - branch: - - dev -when: - event: - - push \ No newline at end of file diff --git a/.woodpecker/.build.yaml b/.woodpecker/.build.yaml new file mode 100644 index 0000000..32ff27f --- /dev/null +++ b/.woodpecker/.build.yaml @@ -0,0 +1,42 @@ +steps: +- name: docker + image: woodpeckerci/plugin-docker-buildx + settings: + registry: git.ar21.de + username: + from_secret: REGISTRY_USER + password: + from_secret: REGISTRY_PASS + repo: git.ar21.de/secondhemd/shbot + tags: latest + when: + - branch: master + event: [push, manual] +- name: docker-build + image: woodpeckerci/plugin-docker-buildx + settings: + registry: git.ar21.de + username: + from_secret: REGISTRY_USER + password: + from_secret: REGISTRY_PASS + repo: git.ar21.de/secondhemd/shbot + tags: latest + dry_run: true + when: + - branch: + exclude: [master, dev] + event: [push, manual] +- name: dev docker + image: woodpeckerci/plugin-docker-buildx + settings: + registry: git.ar21.de + username: + from_secret: REGISTRY_USER + password: + from_secret: REGISTRY_PASS + repo: git.ar21.de/secondhemd/shbot + tags: dev + when: + - branch: dev + event: [push, manual] diff --git a/.woodpecker/.deploy.yaml b/.woodpecker/.deploy.yaml new file mode 100644 index 0000000..fb99a19 --- /dev/null +++ b/.woodpecker/.deploy.yaml @@ -0,0 +1,34 @@ +skip_clone: true +steps: +- name: deploy + image: appleboy/drone-ssh + settings: + host: + - s.ar21.de + username: root + key: + from_secret: DEPLOY_SSH_KEY + port: 22 + command_timeout: 2m + script: + - cd ~/compose/shbot && docker compose pull shbot && docker compose up -d shbot + when: + - branch: master + event: [push, manual] +- name: deploy dev + image: appleboy/drone-ssh + settings: + host: + - s.ar21.de + username: root + key: + from_secret: DEPLOY_SSH_KEY + port: 22 + command_timeout: 2m + script: + - cd /root && docker compose -f shbot-dev.yaml pull shbot-dev && docker compose -f shbot-dev.yaml up -d shbot-dev + when: + - branch: dev + event: [push, manual] +depends_on: + - build