Merge pull request #224 from drone-plugins/improve-config

Drop renovate, proper version definition, unified jsonnet config
This commit is contained in:
Thomas Boerger 2019-03-27 13:25:11 +01:00 committed by GitHub
commit 2908203dff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 68 additions and 82 deletions

View File

@ -54,7 +54,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1803 image: golang:1.11-windowsservercore-1803
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -67,7 +67,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1803 image: golang:1.11-windowsservercore-1803
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -150,7 +150,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1809 image: golang:1.11-windowsservercore-1809
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -163,7 +163,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1809 image: golang:1.11-windowsservercore-1809
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-docker.exe ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -283,7 +283,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1803 image: golang:1.11-windowsservercore-1803
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -296,7 +296,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1803 image: golang:1.11-windowsservercore-1803
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -373,7 +373,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1809 image: golang:1.11-windowsservercore-1809
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -386,7 +386,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1809 image: golang:1.11-windowsservercore-1809
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-gcr.exe ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -500,7 +500,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1803 image: golang:1.11-windowsservercore-1803
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -513,7 +513,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1803 image: golang:1.11-windowsservercore-1803
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -590,7 +590,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1809 image: golang:1.11-windowsservercore-1809
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -603,7 +603,7 @@ steps:
pull: always pull: always
image: golang:1.11-windowsservercore-1809 image: golang:1.11-windowsservercore-1809
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/windows/amd64/drone-ecr.exe ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on

View File

@ -52,7 +52,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -65,7 +65,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -136,7 +136,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -149,7 +149,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-docker ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -220,7 +220,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -233,7 +233,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-docker ./cmd/drone-docker"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -341,7 +341,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -354,7 +354,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -419,7 +419,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -432,7 +432,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-gcr ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -497,7 +497,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -510,7 +510,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-gcr ./cmd/drone-gcr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -612,7 +612,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -625,7 +625,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -690,7 +690,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -703,7 +703,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-ecr ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -768,7 +768,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -781,7 +781,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-ecr ./cmd/drone-ecr"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -883,7 +883,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -896,7 +896,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-heroku"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -961,7 +961,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -974,7 +974,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm64/drone-heroku ./cmd/drone-heroku"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -1039,7 +1039,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_COMMIT_SHA:0:8}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on
@ -1052,7 +1052,7 @@ steps:
pull: always pull: always
image: golang:1.11 image: golang:1.11
commands: commands:
- "go build -v -ldflags \"-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku" - "go build -v -ldflags \"-X main.version=${DRONE_TAG##v}\" -a -tags netgo -o release/linux/arm/drone-heroku ./cmd/drone-heroku"
environment: environment:
CGO_ENABLED: 0 CGO_ENABLED: 0
GO111MODULE: on GO111MODULE: on

View File

@ -14,14 +14,12 @@ Drone plugin to build and publish Docker images to a container registry. For the
Build the binaries with the following commands: Build the binaries with the following commands:
``` ```console
export GOOS=linux export GOOS=linux
export GOARCH=amd64 export GOARCH=amd64
export CGO_ENABLED=0 export CGO_ENABLED=0
export GO111MODULE=on export GO111MODULE=on
go test -cover ./...
go build -v -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker go build -v -a -tags netgo -o release/linux/amd64/drone-docker ./cmd/drone-docker
go build -v -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr go build -v -a -tags netgo -o release/linux/amd64/drone-gcr ./cmd/drone-gcr
go build -v -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr go build -v -a -tags netgo -o release/linux/amd64/drone-ecr ./cmd/drone-ecr
@ -32,7 +30,7 @@ go build -v -a -tags netgo -o release/linux/amd64/drone-heroku ./cmd/drone-herok
Build the Docker images with the following commands: Build the Docker images with the following commands:
``` ```console
docker build \ docker build \
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \ --label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \ --label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
@ -56,9 +54,9 @@ docker build \
## Usage ## Usage
Execute from the working directory: > Notice: Be aware that the Docker plugin currently requires privileged capabilities, otherwise the integrated Docker daemon is not able to start.
``` ```console
docker run --rm \ docker run --rm \
-e PLUGIN_TAG=latest \ -e PLUGIN_TAG=latest \
-e PLUGIN_REPO=octocat/hello-world \ -e PLUGIN_REPO=octocat/hello-world \

View File

@ -1,7 +1,6 @@
package main package main
import ( import (
"fmt"
"os" "os"
"github.com/joho/godotenv" "github.com/joho/godotenv"
@ -11,7 +10,9 @@ import (
"github.com/drone-plugins/drone-docker" "github.com/drone-plugins/drone-docker"
) )
var build = "0" // build number set at compile-time var (
version = "unknown"
)
func main() { func main() {
// Load env-file if it exists first // Load env-file if it exists first
@ -23,7 +24,7 @@ func main() {
app.Name = "docker plugin" app.Name = "docker plugin"
app.Usage = "docker plugin" app.Usage = "docker plugin"
app.Action = run app.Action = run
app.Version = fmt.Sprintf("1.0.%s", build) app.Version = version
app.Flags = []cli.Flag{ app.Flags = []cli.Flag{
cli.BoolFlag{ cli.BoolFlag{
Name: "dry-run", Name: "dry-run",

View File

@ -1,4 +1,4 @@
image: plugins/docker:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}} image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
@ -7,30 +7,30 @@ tags:
{{/if}} {{/if}}
manifests: manifests:
- -
image: plugins/docker:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-amd64 image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- -
image: plugins/docker:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64 image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- -
image: plugins/docker:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
- -
image: plugins/docker:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1803 image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
version: 1803 version: 1803
- -
image: plugins/docker:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1809 image: plugins/docker:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows

View File

@ -1,4 +1,4 @@
image: plugins/ecr:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}} image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
@ -7,30 +7,30 @@ tags:
{{/if}} {{/if}}
manifests: manifests:
- -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-amd64 image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64 image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
- -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1803 image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
version: 1803 version: 1803
- -
image: plugins/ecr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1809 image: plugins/ecr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows

View File

@ -1,4 +1,4 @@
image: plugins/gcr:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}} image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
@ -7,30 +7,30 @@ tags:
{{/if}} {{/if}}
manifests: manifests:
- -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-amd64 image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64 image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux
variant: v7 variant: v7
- -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1803 image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1803
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows
version: 1803 version: 1803
- -
image: plugins/gcr:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}windows-1809 image: plugins/gcr:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}windows-1809
platform: platform:
architecture: amd64 architecture: amd64
os: windows os: windows

View File

@ -1,4 +1,4 @@
image: plugins/heroku:{{#if build.tag}}{{trimPrefix build.tag "v"}}{{else}}latest{{/if}} image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}} {{#if build.tags}}
tags: tags:
{{#each build.tags}} {{#each build.tags}}
@ -7,18 +7,18 @@ tags:
{{/if}} {{/if}}
manifests: manifests:
- -
image: plugins/heroku:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-amd64 image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux
- -
image: plugins/heroku:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm64 image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform: platform:
architecture: arm64 architecture: arm64
os: linux os: linux
variant: v8 variant: v8
- -
image: plugins/heroku:{{#if build.tag}}{{trimPrefix build.tag "v"}}-{{/if}}linux-arm image: plugins/heroku:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform: platform:
architecture: arm architecture: arm
os: linux os: linux

View File

@ -83,7 +83,7 @@ local golang_image(os, version) =
GO111MODULE: 'on', GO111MODULE: 'on',
}, },
commands: [ commands: [
'go build -v -ldflags "-X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/' + os + '/' + arch + '/drone-' + name + extension + ' ./cmd/drone-' + name, 'go build -v -ldflags "-X main.version=${DRONE_COMMIT_SHA:0:8}" -a -tags netgo -o release/' + os + '/' + arch + '/drone-' + name + extension + ' ./cmd/drone-' + name,
], ],
when: { when: {
event: { event: {
@ -100,7 +100,7 @@ local golang_image(os, version) =
GO111MODULE: 'on', GO111MODULE: 'on',
}, },
commands: [ commands: [
'go build -v -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -a -tags netgo -o release/' + os + '/' + arch + '/drone-' + name + extension + ' ./cmd/drone-' + name, 'go build -v -ldflags "-X main.version=${DRONE_TAG##v}" -a -tags netgo -o release/' + os + '/' + arch + '/drone-' + name + extension + ' ./cmd/drone-' + name,
], ],
when: { when: {
event: ['tag'], event: ['tag'],

View File

@ -1,13 +0,0 @@
{
"extends": [
"config:base"
],
"docker": {
"fileMatch": [
"/docker/Dockerfile"
]
},
"labels": [
"renovate"
]
}