chore(ci): move to woodpecker
This commit is contained in:
parent
706e3d0ca8
commit
530610d905
5 changed files with 77 additions and 114 deletions
114
.drone.yml
114
.drone.yml
|
@ -1,114 +0,0 @@
|
||||||
kind: pipeline
|
|
||||||
name: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: gofmt
|
|
||||||
image: golang:1.23.0
|
|
||||||
commands:
|
|
||||||
- gofmt -l -s .
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- name: vuln-check
|
|
||||||
image: golang:1.23.0
|
|
||||||
commands:
|
|
||||||
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
||||||
- govulncheck ./...
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
- name: docker
|
|
||||||
image: thegeeklab/drone-docker-buildx
|
|
||||||
privileged: true
|
|
||||||
settings:
|
|
||||||
registry: git.ar21.de
|
|
||||||
username:
|
|
||||||
from_secret: REGISTRY_USER
|
|
||||||
password:
|
|
||||||
from_secret: REGISTRY_PASS
|
|
||||||
repo: git.ar21.de/yolokube/country-geo-locations
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- ${DRONE_BUILD_NUMBER}
|
|
||||||
platforms:
|
|
||||||
- linux/arm64
|
|
||||||
- linux/amd64
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
depends_on:
|
|
||||||
- gofmt
|
|
||||||
- vuln-check
|
|
||||||
- name: docker-build
|
|
||||||
image: thegeeklab/drone-docker-buildx
|
|
||||||
privileged: true
|
|
||||||
settings:
|
|
||||||
registry: git.ar21.de
|
|
||||||
username:
|
|
||||||
from_secret: REGISTRY_USER
|
|
||||||
password:
|
|
||||||
from_secret: REGISTRY_PASS
|
|
||||||
repo: git.ar21.de/yolokube/country-geo-locations
|
|
||||||
tags:
|
|
||||||
- latest
|
|
||||||
- ${DRONE_BUILD_NUMBER}
|
|
||||||
platforms:
|
|
||||||
- linux/arm64
|
|
||||||
- linux/amd64
|
|
||||||
dry_run: true
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
exclude:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
depends_on:
|
|
||||||
- gofmt
|
|
||||||
- vuln-check
|
|
||||||
- name: bump tag in deployment-repo
|
|
||||||
image: git.ar21.de/aaron/kustomize-ci
|
|
||||||
commands:
|
|
||||||
- cd /deployment-repo
|
|
||||||
- git clone https://git.ar21.de/yolokube/fail2ban-exporter-deployment.git .
|
|
||||||
- cd /deployment-repo
|
|
||||||
- kustomize edit set image git.ar21.de/yolokube/country-geo-locations=git.ar21.de/yolokube/country-geo-locations:${DRONE_BUILD_NUMBER}
|
|
||||||
volumes:
|
|
||||||
- name: deployment-repo
|
|
||||||
path: /deployment-repo
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
depends_on:
|
|
||||||
- docker
|
|
||||||
- name: push new tag to deployment-repo
|
|
||||||
image: appleboy/drone-git-push
|
|
||||||
settings:
|
|
||||||
branch: main
|
|
||||||
remote: ssh://git@git.ar21.de:2222/yolokube/fail2ban-exporter-deployment.git
|
|
||||||
path: /deployment-repo
|
|
||||||
force: false
|
|
||||||
commit: true
|
|
||||||
commit_message: "yolokube/country-geo-locations: update image tag to ${DRONE_BUILD_NUMBER} (done automagically via Drone pipeline)"
|
|
||||||
ssh_key:
|
|
||||||
from_secret: GITEA_SSH_KEY
|
|
||||||
volumes:
|
|
||||||
- name: deployment-repo
|
|
||||||
path: /deployment-repo
|
|
||||||
when:
|
|
||||||
branch:
|
|
||||||
- main
|
|
||||||
event:
|
|
||||||
- push
|
|
||||||
depends_on:
|
|
||||||
- bump tag in deployment-repo
|
|
||||||
volumes:
|
|
||||||
- name: deployment-repo
|
|
||||||
temp: {}
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- pull_request
|
|
36
.woodpecker/.build.yaml
Normal file
36
.woodpecker/.build.yaml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
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/yolokube/country-geo-locations
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- ${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: push
|
||||||
|
- name: docker-staging
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
registry: git.ar21.de
|
||||||
|
username:
|
||||||
|
from_secret: REGISTRY_USER
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_PASS
|
||||||
|
repo: git.ar21.de/yolokube/country-geo-locations
|
||||||
|
tags:
|
||||||
|
- staging
|
||||||
|
- staging-${CI_PIPELINE_NUMBER}
|
||||||
|
dry_run: true
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: main
|
||||||
|
event: push
|
||||||
|
depends_on:
|
||||||
|
- gofmt
|
||||||
|
- vulncheck
|
26
.woodpecker/.deploy.yaml
Normal file
26
.woodpecker/.deploy.yaml
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
steps:
|
||||||
|
- name: bump tag in deployment-repo
|
||||||
|
image: git.ar21.de/aaron/kustomize-ci
|
||||||
|
commands:
|
||||||
|
- git clone https://git.ar21.de/yolokube/fail2ban-exporter-deployment.git deployment-repo
|
||||||
|
- cd deployment-repo
|
||||||
|
- kustomize edit set image git.ar21.de/yolokube/country-geo-locations=git.ar21.de/yolokube/country-geo-locations:${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: push
|
||||||
|
- name: push new tag to deployment-repo
|
||||||
|
image: appleboy/drone-git-push
|
||||||
|
settings:
|
||||||
|
branch: main
|
||||||
|
remote: ssh://git@git.ar21.de:2222/yolokube/fail2ban-exporter-deployment.git
|
||||||
|
path: deployment-repo
|
||||||
|
force: false
|
||||||
|
commit: true
|
||||||
|
commit_message: "yolokube/country-geo-locations: update image tag to ${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
|
||||||
|
ssh_key:
|
||||||
|
from_secret: FORGEJO_SSH_KEY
|
||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: push
|
||||||
|
depends_on:
|
||||||
|
- build
|
7
.woodpecker/.gofmt.yaml
Normal file
7
.woodpecker/.gofmt.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
steps:
|
||||||
|
- name: gofmt
|
||||||
|
image: golang:1.23.0
|
||||||
|
commands:
|
||||||
|
- gofmt -l -s .
|
||||||
|
when:
|
||||||
|
- event: push
|
8
.woodpecker/.vulncheck.yaml
Normal file
8
.woodpecker/.vulncheck.yaml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
steps:
|
||||||
|
- name: vuln-check
|
||||||
|
image: golang:1.23.0
|
||||||
|
commands:
|
||||||
|
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||||
|
- govulncheck ./...
|
||||||
|
when:
|
||||||
|
- event: push
|
Loading…
Reference in a new issue