Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Use drone #154

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
@@ -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(),
]
}
75 changes: 75 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -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

...
17 changes: 17 additions & 0 deletions docker/go-1.11.5/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 <peterke@gmail.com>

# 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
2 changes: 1 addition & 1 deletion docker/go-1.11.x/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <peterke@gmail.com>
10 changes: 10 additions & 0 deletions docker/go-1.12.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions docker/go-1.12.x/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM techknowlogick/xgo:go-1.12.0
4 changes: 1 addition & 3 deletions docker/go-latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
#
# Released under the MIT license.

FROM karalabe/xgo-1.11.x

MAINTAINER Péter Szilágyi <peterke@gmail.com>
FROM techknowlogick/xgo:go-1.12.x
4 changes: 2 additions & 2 deletions xgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down