drone-ci-demo/.drone.yml

43 lines
749 B
YAML
Raw Normal View History

2021-12-04 14:57:01 +08:00
kind: pipeline
type: docker
name: default
steps:
2021-12-04 15:12:39 +08:00
- name: greeting
image: alpine
commands:
- echo hello
- echo world
- echo done
- name: en
image: alpine
commands:
- echo hello world
- name: fr
image: alpine
commands:
- echo bonjour monde
2021-12-04 15:06:41 +08:00
2021-12-05 01:21:24 +08:00
- name: build
image: golang:1.17-alpine
pull: if-not-exists
commands:
- CGO_ENABLED=0 GOOS="linux" GOARCH="amd64" go build -ldflags="-s -w" -tags timetzdata -o app main.go
2021-12-05 00:41:44 +08:00
- name: docker
image: plugins/docker
2021-12-05 01:03:06 +08:00
settings:
repo: esinio/helloworld
username:
from_secret: docker_username
password:
from_secret: docker_password
2021-12-05 00:41:44 +08:00
2021-12-04 15:06:41 +08:00
trigger:
2021-12-04 16:04:27 +08:00
branch:
- master
2021-12-04 15:06:41 +08:00
event:
2021-12-04 15:12:39 +08:00
- push