add package to go build
This commit is contained in:
parent
8f1e0ad11d
commit
9c9975d6a8
2 changed files with 12 additions and 12 deletions
|
@ -77,9 +77,9 @@ local pipeline(name, os, arch) = {
|
||||||
image: golang,
|
image: golang,
|
||||||
volumes: mounts,
|
volumes: mounts,
|
||||||
commands: [
|
commands: [
|
||||||
"go build -o release/"+ os +"/" + arch + "/drone-server",
|
"go build -ldflags \"-extldflags \\\\\"-static\\\\\"\" -o release/"+ os +"/" + arch + "/drone-server github.com/drone/drone/cmd/drone-server",
|
||||||
"go build -o release/"+ os +"/" + arch + "/drone-agent",
|
"CGO_ENABLED=0 go build -o release/"+ os +"/" + arch + "/drone-agent github.com/drone/drone/cmd/drone-agent",
|
||||||
"go build -o release/"+ os +"/" + arch + "/drone-controller",
|
"CGO_ENABLED=0 go build -o release/"+ os +"/" + arch + "/drone-controller github.com/drone/drone/cmd/drone-controller",
|
||||||
],
|
],
|
||||||
when: {
|
when: {
|
||||||
event: [ "push", "tag" ],
|
event: [ "push", "tag" ],
|
||||||
|
|
18
.drone.yml
18
.drone.yml
|
@ -18,9 +18,9 @@ steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: golang:1.11
|
image: golang:1.11
|
||||||
commands:
|
commands:
|
||||||
- go build -o release/linux/amd64/drone-server
|
- "go build -ldflags \"-extldflags \\\\\"-static\\\\\"\" -o release/linux/amd64/drone-server github.com/drone/drone/cmd/drone-server"
|
||||||
- go build -o release/linux/amd64/drone-agent
|
- CGO_ENABLED=0 go build -o release/linux/amd64/drone-agent github.com/drone/drone/cmd/drone-agent
|
||||||
- go build -o release/linux/amd64/drone-controller
|
- CGO_ENABLED=0 go build -o release/linux/amd64/drone-controller github.com/drone/drone/cmd/drone-controller
|
||||||
volumes:
|
volumes:
|
||||||
- name: gopath
|
- name: gopath
|
||||||
path: /go
|
path: /go
|
||||||
|
@ -101,9 +101,9 @@ steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: golang:1.11
|
image: golang:1.11
|
||||||
commands:
|
commands:
|
||||||
- go build -o release/linux/arm/drone-server
|
- "go build -ldflags \"-extldflags \\\\\"-static\\\\\"\" -o release/linux/arm/drone-server github.com/drone/drone/cmd/drone-server"
|
||||||
- go build -o release/linux/arm/drone-agent
|
- CGO_ENABLED=0 go build -o release/linux/arm/drone-agent github.com/drone/drone/cmd/drone-agent
|
||||||
- go build -o release/linux/arm/drone-controller
|
- CGO_ENABLED=0 go build -o release/linux/arm/drone-controller github.com/drone/drone/cmd/drone-controller
|
||||||
volumes:
|
volumes:
|
||||||
- name: gopath
|
- name: gopath
|
||||||
path: /go
|
path: /go
|
||||||
|
@ -184,9 +184,9 @@ steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: golang:1.11
|
image: golang:1.11
|
||||||
commands:
|
commands:
|
||||||
- go build -o release/linux/arm64/drone-server
|
- "go build -ldflags \"-extldflags \\\\\"-static\\\\\"\" -o release/linux/arm64/drone-server github.com/drone/drone/cmd/drone-server"
|
||||||
- go build -o release/linux/arm64/drone-agent
|
- CGO_ENABLED=0 go build -o release/linux/arm64/drone-agent github.com/drone/drone/cmd/drone-agent
|
||||||
- go build -o release/linux/arm64/drone-controller
|
- CGO_ENABLED=0 go build -o release/linux/arm64/drone-controller github.com/drone/drone/cmd/drone-controller
|
||||||
volumes:
|
volumes:
|
||||||
- name: gopath
|
- name: gopath
|
||||||
path: /go
|
path: /go
|
||||||
|
|
Loading…
Reference in a new issue