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:
|
2021-12-05 03:26:10 +08:00
|
|
|
- export CGO_ENABLED=0
|
|
|
|
- export GOOS="linux"
|
|
|
|
- export GOARCH="amd64"
|
|
|
|
- go build -ldflags="-s -w" -tags timetzdata -o app main.go
|
2021-12-05 01:21:24 +08:00
|
|
|
|
2021-12-05 03:26:10 +08:00
|
|
|
- name: publish
|
2021-12-05 00:41:44 +08:00
|
|
|
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
|