Added base woodpecker task
This commit is contained in:
67
.drone.yml
67
.drone.yml
@@ -1,67 +0,0 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: static_check
|
||||
image: golang:latest
|
||||
commands:
|
||||
- go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
- cd src && staticcheck ./...
|
||||
volumes:
|
||||
- name: gopath
|
||||
path: /go
|
||||
|
||||
- name: lint
|
||||
image: golang:latest
|
||||
commands:
|
||||
- go install golang.org/x/lint/golint@latest
|
||||
- golint ./src/...
|
||||
volumes:
|
||||
- name: gopath
|
||||
path: /go
|
||||
|
||||
- name: analyze
|
||||
image: golang:latest
|
||||
commands:
|
||||
- cd src && go vet ./...
|
||||
volumes:
|
||||
- name: gopath
|
||||
path: /go
|
||||
|
||||
- name: publish_image
|
||||
image: plugins/docker
|
||||
environment:
|
||||
DOCKER_USERNAME:
|
||||
from_secret: registry_username
|
||||
DOCKER_PASSWORD:
|
||||
from_secret: registry_password
|
||||
commands:
|
||||
- sleep 5
|
||||
- ./deploy/image-build.sh
|
||||
- ./deploy/image-push.sh
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
path: /var/run
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
|
||||
services:
|
||||
- name: docker
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
volumes:
|
||||
- name: docker-sock
|
||||
path: /var/run
|
||||
- name: etc_hosts
|
||||
path: /etc/hosts
|
||||
|
||||
volumes:
|
||||
- name: gopath
|
||||
temp: {}
|
||||
- name: docker-sock
|
||||
temp: {}
|
||||
- name: etc_hosts
|
||||
host:
|
||||
path: /etc/hosts
|
||||
96
.woodpecker/workflow.yaml
Normal file
96
.woodpecker/workflow.yaml
Normal file
@@ -0,0 +1,96 @@
|
||||
when:
|
||||
- event: push
|
||||
branch: develop
|
||||
|
||||
steps:
|
||||
# - name: analyze
|
||||
# image: golang:1.24
|
||||
# commands:
|
||||
# - echo "Analyze"
|
||||
# - cd src && go vet ./...
|
||||
# - name: static check
|
||||
# image: golang:1.24
|
||||
# commands:
|
||||
# - echo "Static Check"
|
||||
# - go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
# - cd src && staticcheck ./...
|
||||
# - name: lint
|
||||
# image: golang:1.24
|
||||
# commands:
|
||||
# - echo "Lint"
|
||||
# - go install golang.org/x/lint/golint@latest
|
||||
# - golint ./src/...
|
||||
- name: publish image
|
||||
image: plugins/docker
|
||||
commands:
|
||||
- sleep 5
|
||||
- ./deploy/image-build.sh
|
||||
- ./deploy/image-push.sh
|
||||
|
||||
# kind: pipeline
|
||||
# type: docker
|
||||
# name: default
|
||||
|
||||
# steps:
|
||||
# - name: static_check
|
||||
# image: golang:latest
|
||||
# commands:
|
||||
# - go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
# - cd src && staticcheck ./...
|
||||
# volumes:
|
||||
# - name: gopath
|
||||
# path: /go
|
||||
|
||||
# - name: lint
|
||||
# image: golang:latest
|
||||
# commands:
|
||||
# - go install golang.org/x/lint/golint@latest
|
||||
# - golint ./src/...
|
||||
# volumes:
|
||||
# - name: gopath
|
||||
# path: /go
|
||||
|
||||
# - name: analyze
|
||||
# image: golang:latest
|
||||
# commands:
|
||||
# - cd src && go vet ./...
|
||||
# volumes:
|
||||
# - name: gopath
|
||||
# path: /go
|
||||
|
||||
# - name: publish_image
|
||||
# image: plugins/docker
|
||||
# environment:
|
||||
# DOCKER_USERNAME:
|
||||
# from_secret: registry_username
|
||||
# DOCKER_PASSWORD:
|
||||
# from_secret: registry_password
|
||||
# commands:
|
||||
# - sleep 5
|
||||
# - ./deploy/image-build.sh
|
||||
# - ./deploy/image-push.sh
|
||||
# volumes:
|
||||
# - name: docker-sock
|
||||
# path: /var/run
|
||||
# when:
|
||||
# branch:
|
||||
# - main
|
||||
|
||||
# services:
|
||||
# - name: docker
|
||||
# image: docker:dind
|
||||
# privileged: true
|
||||
# volumes:
|
||||
# - name: docker-sock
|
||||
# path: /var/run
|
||||
# - name: etc_hosts
|
||||
# path: /etc/hosts
|
||||
|
||||
# volumes:
|
||||
# - name: gopath
|
||||
# temp: {}
|
||||
# - name: docker-sock
|
||||
# temp: {}
|
||||
# - name: etc_hosts
|
||||
# host:
|
||||
# path: /etc/hosts
|
||||
Reference in New Issue
Block a user