forked from Ivasoft/drone-docker
All checks were successful
continuous-integration/drone/push Build is passing
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
kind: pipeline
|
|
name: default
|
|
|
|
steps:
|
|
- name: build-push
|
|
image: golang:1.17
|
|
commands:
|
|
- 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker'
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
when:
|
|
event:
|
|
exclude:
|
|
- tag
|
|
|
|
- name: build-tag
|
|
image: golang:1.17
|
|
commands:
|
|
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker'
|
|
environment:
|
|
CGO_ENABLED: 0
|
|
when:
|
|
event:
|
|
- tag
|
|
|
|
- name: executable
|
|
image: golang:1.17
|
|
commands:
|
|
- ./release/linux/amd64/drone-docker --help
|
|
|
|
- name: publish
|
|
image: plugins/docker
|
|
settings:
|
|
registry: https://git.ivasoft.cz
|
|
dockerfile: docker/docker/Dockerfile.linux.amd64
|
|
username:
|
|
from_secret: repo_user
|
|
password:
|
|
from_secret: repo_pass
|
|
repo: git.ivasoft.cz/sw/drone-docker
|
|
tags:
|
|
- latest
|
|
- ${DRONE_TAG:-latest}
|
|
when:
|
|
event:
|
|
exclude:
|
|
- pull_request |