Execute built binary as simple test

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2019-01-23 09:21:52 +08:00
parent e6cecb3661
commit c001d2248b
3 changed files with 36 additions and 4 deletions
+8
View File
@@ -105,6 +105,14 @@ local PipelineBuild(os="linux", arch="amd64") = {
event: [ "tag" ],
},
},
{
name: "executable",
image: "golang:1.11",
pull: "always",
commands: [
"./release/" + os + "/" + arch + "/drone-discord --help",
],
},
{
name: "dryrun",
image: "plugins/docker:" + os + "-" + arch,
+10 -4
View File
@@ -7,11 +7,11 @@ platform:
arch: amd64
steps:
- name: build
- name: build-push
pull: always
image: golang:1.11
commands:
- 'go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-webhook'
- 'go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-discord'
environment:
CGO_ENABLED: 0
GO111MODULE: on
@@ -20,11 +20,11 @@ steps:
- push
- pull_request
- name: build
- name: build-tag
pull: always
image: golang:1.11
commands:
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-webhook'
- 'go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -o release/windows/amd64/drone-discord'
environment:
CGO_ENABLED: 0
GO111MODULE: on
@@ -32,6 +32,12 @@ steps:
event:
- tag
- name: executable
pull: always
image: golang:1.11
commands:
- ./release/windows/amd64/drone-discord --help
- name: dryrun
pull: always
image: plugins/docker:windows-amd64
+18
View File
@@ -89,6 +89,12 @@ steps:
event:
- tag
- name: executable
pull: always
image: golang:1.11
commands:
- ./release/linux/amd64/drone-discord --help
- name: dryrun
pull: always
image: plugins/docker:linux-amd64
@@ -163,6 +169,12 @@ steps:
event:
- tag
- name: executable
pull: always
image: golang:1.11
commands:
- ./release/linux/arm64/drone-discord --help
- name: dryrun
pull: always
image: plugins/docker:linux-arm64
@@ -237,6 +249,12 @@ steps:
event:
- tag
- name: executable
pull: always
image: golang:1.11
commands:
- ./release/linux/arm/drone-discord --help
- name: dryrun
pull: always
image: plugins/docker:linux-arm