forked from kernelpayments/kube-google-iam
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.drone.yml
24 lines (24 loc) · 918 Bytes
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
pipeline:
build:
image: golang:1.12
commands:
- export GOCACHE=/go/cache
- ORG_PATH="github.com/kernelpayments"
- BINARY_NAME=kube-google-iam
- REPO_PATH=$ORG_PATH/$BINARY_NAME
- VERSION_VAR=$REPO_PATH/version.Version
- GIT_VAR=$REPO_PATH/version.GitCommit
- BUILD_DATE_VAR=$REPO_PATH/version.BuildDate
- BUILD_DATE=$(date +%Y-%m-%d-%H:%M)
- GOBUILD_VERSION_ARGS="-s -X $VERSION_VAR=$DRONE_TAG -X $GIT_VAR=$DRONE_COMMIT -X $BUILD_DATE_VAR=$BUILD_DATE"
- echo Building with version args... $GOBUILD_VERSION_ARGS
- CGO_ENABLED=0 go build -mod=readonly -o build/bin/linux/kube-google-iam -ldflags "$GOBUILD_VERSION_ARGS" .
volumes:
- /tmp/go/pkg:/go/pkg
- /tmp/go/cache:/go/cache
docker:
image: eu.gcr.io/kernel-prod/drone-docker
prefix: gcr.io/kernel-payments
tag_latest: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock