Browse Source

Need to build executable first

master 1.2.0
Fábio Kaiser Rauber 2 years ago
parent
commit
17c4ed991a
  1. 47
      .drone.yml

47
.drone.yml

@ -3,8 +3,41 @@ kind: pipeline
name: linux-amd64 name: linux-amd64
type: kubernetes type: kubernetes
platform:
os: linux
arch: amd64
steps: steps:
- name: docker - name: build-push
pull: always
image: golang:1.16
commands:
- "go build -v -ldflags '-X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/drone-packer"
environment:
CGO_ENABLED: 0
when:
event:
exclude:
- tag
- name: build-tag
pull: always
image: golang:1.16
commands:
- "go build -v -ldflags '-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}' -a -o release/linux/amd64/drone-packer"
environment:
CGO_ENABLED: 0
when:
event:
- tag
- name: executable
pull: always
image: golang:1.16
commands:
- ./release/linux/amd64/drone-packer --help
- name: publish
image: plugins/docker image: plugins/docker
settings: settings:
repo: porto.interlegis.leg.br/library/drone-packer repo: porto.interlegis.leg.br/library/drone-packer
@ -16,4 +49,14 @@ steps:
username: username:
from_secret: porto_user from_secret: porto_user
password: password:
from_secret: porto_pw from_secret: porto_pw
when:
event:
exclude:
- pull_request
trigger:
ref:
- refs/heads/master
- "refs/pull/**"
- "refs/tags/**"
Loading…
Cancel
Save