You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
651 B

kind: pipeline
type: docker
name: default
platform:
arch: amd64
os: linux
steps:
- name: test
image: golang:1.16.4
commands:
- go test
- name: build
image: golang:1.16.4
commands:
- go build -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}"
- name: publish
image: plugins/docker:19.03.8
when:
branch:
- master
settings:
insecure: true
registry: 49.4.92.112:9500
repo: 49.4.92.112:9500/example/go
username: admin
password: aA123456!
tags:
- latest
- ${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}-${DRONE_REPO_BRANCH}-${DRONE_COMMIT_SHA:0:8}