Gisle Aune
4 years ago
2 changed files with 70 additions and 23 deletions
-
81.drone.yml
-
12Dockerfile
@ -1,21 +1,70 @@ |
|||
workspace: |
|||
base: /go |
|||
path: src/git.aiterp.net/rpdata/logbot3 |
|||
name: logbot3 |
|||
|
|||
pipeline: |
|||
docker-release: |
|||
kind: pipeline |
|||
type: docker |
|||
|
|||
steps: |
|||
- name: go-build-1.11 |
|||
image: golang:1.11 |
|||
commands: |
|||
- go mod download |
|||
- CGO_ENABLED=0 go build -ldflags "-w -s" . |
|||
when: |
|||
event: |
|||
exclude: |
|||
- tag |
|||
|
|||
- name: go-build-1.12 |
|||
image: golang:1.12 |
|||
commands: |
|||
- go mod download |
|||
- CGO_ENABLED=0 go build -ldflags "-w -s" . |
|||
when: |
|||
event: |
|||
exclude: |
|||
- tag |
|||
|
|||
- name: go-build-1.13 |
|||
image: golang:1.13 |
|||
commands: |
|||
- go mod download |
|||
- CGO_ENABLED=0 go build -ldflags "-w -s" . |
|||
when: |
|||
event: |
|||
exclude: |
|||
- tag |
|||
|
|||
- name: go-test |
|||
image: golang:1.13 |
|||
commands: |
|||
- go test -v ./... |
|||
when: |
|||
event: |
|||
exclude: |
|||
- tag |
|||
|
|||
- name: docker-release-tag |
|||
image: plugins/docker |
|||
repo: vmaple/rpdata-logbot3 |
|||
auto_tag: true |
|||
secrets: [ docker_username, docker_password ] |
|||
settings: |
|||
auto_tag: true |
|||
username: |
|||
from_secret: docker_username |
|||
password: |
|||
from_secret: docker_password |
|||
repo: r.vmaple.dev/rpdata/logbot3 |
|||
when: |
|||
event: tag |
|||
ref: refs/tags/* |
|||
docker-release-latest: |
|||
event: |
|||
- tag |
|||
|
|||
- name: docker-release-latest |
|||
image: plugins/docker |
|||
repo: vmaple/rpdata-logbot3 |
|||
tags: latest |
|||
secrets: [ docker_username, docker_password ] |
|||
settings: |
|||
auto_tag: false |
|||
username: |
|||
from_secret: docker_username |
|||
password: |
|||
from_secret: docker_password |
|||
repo: r.vmaple.dev/rpdata/logbot3 |
|||
when: |
|||
event: tag |
|||
ref: refs/tags/* |
|||
event: |
|||
- tag⏎ |
Write
Preview
Loading…
Cancel
Save
Reference in new issue