|
@ -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/**" |