diff --git a/.drone.jsonnet b/.drone.jsonnet new file mode 100644 index 00000000..0bc9026c --- /dev/null +++ b/.drone.jsonnet @@ -0,0 +1,31 @@ +local BuildWithDiffTags(version='go-latest', tags='latest') = { + name: 'build-' + version, + pull: 'always', + image: 'plugins/docker', + settings: { + dry_run: true, + dockerfile: 'docker/' +version+'/Dockerfile', + password: { + from_secret: 'docker_password' + }, + username: { + from_secret: 'docker_username' + }, + repo: 'techknowlogick/xgo', + tags: tags + } +}; + +local BuildStep(version='go-latest') = BuildWithDiffTags(version, version); + +{ +kind: 'pipeline', +name: 'default', +steps: [ + BuildStep('go-1.12.0'), + BuildStep('go-1.12.x'), + BuildStep('go-1.11.5'), + BuildStep('go-1.11.x'), + BuildWithDiffTags(), +] +} \ No newline at end of file diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 00000000..88f4099b --- /dev/null +++ b/.drone.yml @@ -0,0 +1,75 @@ +--- +kind: pipeline +name: default + +platform: + os: linux + arch: amd64 + +steps: +- name: build-go-1.12.0 + pull: always + image: plugins/docker + settings: + dockerfile: docker/go-1.12.0/Dockerfile + dry_run: true + password: + from_secret: docker_password + repo: techknowlogick/xgo + tags: go-1.12.0 + username: + from_secret: docker_username + +- name: build-go-1.12.x + pull: always + image: plugins/docker + settings: + dockerfile: docker/go-1.12.x/Dockerfile + dry_run: true + password: + from_secret: docker_password + repo: techknowlogick/xgo + tags: go-1.12.x + username: + from_secret: docker_username + +- name: build-go-1.11.5 + pull: always + image: plugins/docker + settings: + dockerfile: docker/go-1.11.5/Dockerfile + dry_run: true + password: + from_secret: docker_password + repo: techknowlogick/xgo + tags: go-1.11.5 + username: + from_secret: docker_username + +- name: build-go-1.11.x + pull: always + image: plugins/docker + settings: + dockerfile: docker/go-1.11.x/Dockerfile + dry_run: true + password: + from_secret: docker_password + repo: techknowlogick/xgo + tags: go-1.11.x + username: + from_secret: docker_username + +- name: build-go-latest + pull: always + image: plugins/docker + settings: + dockerfile: docker/go-latest/Dockerfile + dry_run: true + password: + from_secret: docker_password + repo: techknowlogick/xgo + tags: latest + username: + from_secret: docker_username + +... diff --git a/docker/go-1.11.5/Dockerfile b/docker/go-1.11.5/Dockerfile new file mode 100644 index 00000000..971c9fdb --- /dev/null +++ b/docker/go-1.11.5/Dockerfile @@ -0,0 +1,17 @@ +# Go cross compiler (xgo): Go 1.11.5 +# Copyright (c) 2018 Péter Szilágyi. All rights reserved. +# +# Released under the MIT license. + +FROM karalabe/xgo-base + +MAINTAINER Péter Szilágyi + +# Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 1115 + +RUN \ + export ROOT_DIST=https://storage.googleapis.com/golang/go1.11.5.linux-amd64.tar.gz && \ + export ROOT_DIST_SHA=ff54aafedff961eb94792487e827515da683d61a5f9482f668008832631e5d25 && \ + \ + $BOOTSTRAP_PURE diff --git a/docker/go-1.11.x/Dockerfile b/docker/go-1.11.x/Dockerfile index 26ba914d..52e61c68 100644 --- a/docker/go-1.11.x/Dockerfile +++ b/docker/go-1.11.x/Dockerfile @@ -3,6 +3,6 @@ # # Released under the MIT license. -FROM karalabe/xgo-1.11.1 +FROM techknowlogick/xgo:go-1.11.5 MAINTAINER Péter Szilágyi diff --git a/docker/go-1.12.0/Dockerfile b/docker/go-1.12.0/Dockerfile new file mode 100644 index 00000000..f6457e71 --- /dev/null +++ b/docker/go-1.12.0/Dockerfile @@ -0,0 +1,10 @@ +FROM techknowlogick/xgo:base + +# Configure the root Go distribution and bootstrap based on it +ENV GO_VERSION 1120 + +RUN \ + export ROOT_DIST=https://storage.googleapis.com/golang/go1.12.linux-amd64.tar.gz && \ + export ROOT_DIST_SHA=3ac1db65a6fa5c13f424b53ee181755429df0c33775733cede1e0d540440fd7b && \ + \ + $BOOTSTRAP_PURE diff --git a/docker/go-1.12.x/Dockerfile b/docker/go-1.12.x/Dockerfile new file mode 100644 index 00000000..b14f4dd3 --- /dev/null +++ b/docker/go-1.12.x/Dockerfile @@ -0,0 +1 @@ +FROM techknowlogick/xgo:go-1.12.0 diff --git a/docker/go-latest/Dockerfile b/docker/go-latest/Dockerfile index ff80bd3b..4d200887 100644 --- a/docker/go-latest/Dockerfile +++ b/docker/go-latest/Dockerfile @@ -3,6 +3,4 @@ # # Released under the MIT license. -FROM karalabe/xgo-1.11.x - -MAINTAINER Péter Szilágyi +FROM techknowlogick/xgo:go-1.12.x diff --git a/xgo.go b/xgo.go index b2bae9ce..419bfab4 100644 --- a/xgo.go +++ b/xgo.go @@ -39,8 +39,8 @@ func init() { } // Cross compilation docker containers -var dockerBase = "karalabe/xgo-base" -var dockerDist = "karalabe/xgo-" +var dockerBase = "techknowlogick/xgo:base" +var dockerDist = "techknowlogick/xgo:" // Command line arguments to fine tune the compilation var (