From df0c6cd567c413e62efd1d75efd65d2cd09fa2d1 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sun, 25 Oct 2015 17:44:06 -0700 Subject: [PATCH] use a custom build image to avoid compiling sass and sqlite every time --- .drone.sec | 2 +- .drone.yml | 4 +--- Dockerfile.env | 15 +++++++-------- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.drone.sec b/.drone.sec index 31cb08b2..f8c81217 100644 --- a/.drone.sec +++ b/.drone.sec @@ -1 +1 @@ -eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.KaxqyEtYnsyjK0qVgG9mfliQQJsTTrzWhJkv5gvHXClcMSQ7WF8ASonjDDMvQ9cfdgfb9GY9ZljfRYwKG1pkrTOzquXya_j6rPfYA0NxpJ5CQcv6w97NqW_7ZoHR3HLEqtMUomReYEFr_AGMfZJUYLCOWQZwzFQ-U1oSgpxNO0H1DaqhjcEkuPwcXnUvfKMJ1dRdvSFr0mHZAfIidkS-n1Jct5UsqAtgzORL_9g4WP7WmPDQuwqhOhxwYRd3eSg-nhhJv7B337Nnq1OcImS5WOgXf_7C_Hg_KzL6Ng4JPDF9fhXzAYCJ4-od1jlUH8-55BOPW81mG2cSe_CDUXoVgQ.kbk5v-POj3XudQhp.niD-kndAAwkNAbW_1Ew7EJTS8aKOpQ4WJ1-eS6rFLnLk0Z9my7uribsjnR-B-CzCs1AGpg2CBvWjEIFWoYuBBHqFi0_jXrDkh9JgqQM21_6hgd1FFMIsmFViuROZM2sCmai7XTKhFGs0sRT320F_-lE0lXTa7FLnwqHTzCRzjDG8wrYLuXSH0nIVbzTRUAhfiH8RzxI3n6YFqavoDfLve9d-HhJ11NsEIOzHDyCD0Lp41WBMz8BZ4-Vv5aoHLqgyn_AC03kPBweXskvXgRAM0TOTE0ko9JRVhok2CqNKW76JNveQwgZe08JIX-PHpLKkjghjeWFgtAD44FwObG7_FIb_n3gO.g_SaQlLuXLRCvfXZujgljw +eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.JE40fDYd7v_Te9_6jzQIOA8mzC-jvAJDIHud7Ke8i9cTCjDIxo4TWmrc7SNVMzLlPUtYt0-D2nOmyw__i-hBIOgo_feTAk5PnDlvcrU5W8BVteJOaLOKCwD6nw6ObcOuODm-1B21plqSy08P8bPjnXH3D1mABodA5eHTyr8OuqnuPYEe-4gtbY0MZeXG_XMwz0-2DtGpcSwy0qWyMffZAsjh14SLsyJdrljTKZZ0-lS1Lne3YK7B3T1_h-yKBbvUbYdNtv6prZEtk7apQ7eVbC7iHFkpNpF-0WfWQNXPo04oQtgqJC8lSjvGZn6YDf-Iaj3UHcIXrgvp714wisnVaA.uHzYPaFIy271mjov.eWbKNR1ELpfxDHy4SEMPAfoLenjnCV4gZlmGzaMQrwH1j7UOkVJVnh4qP_H2egJKV4HuW_63iE2m3jBbL8UNZNqht_ALhZpJZuXKVn9kVEd5w6PXSHUGeZFEl2deDC9YoBNxZ6p7i5N0DsdKkmGd9XugRzcp85m23hzh2dP8exCYL9BlKJqXpaBAV1b91r_iKs0Io2iGfK8QNcrMKQXWjw4wjFJOxmaDg6_IfTtLmxcdAUJoEf7fzfHTmN4H1C2sNvE8LpnL17DRSg_veCNdezilzvVaH9eHIg8nRRdkPUGcIwr1h8hFN-5cmN2YxzT8N5kOnGvxPN2ADhB61HuflPn3hh6aCIa6-68UKqaA9NqkrBvt7_OUKy8sLh9nSEN10Nmk2g.AX_3-v4-teG0tJfwUtB2Uw \ No newline at end of file diff --git a/.drone.yml b/.drone.yml index 286d7b47..dca592bc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,12 +2,10 @@ clone: path: github.com/drone/drone build: - image: golang:1.5 + image: drone/golang:1.5 environment: - GO15VENDOREXPERIMENT=1 commands: - - /bin/bash contrib/setup-sqlite.sh 1> /dev/null - - /bin/bash contrib/setup-sassc.sh 1> /dev/null - make deps gen - make test test_postgres test_mysql - make build build_static deb docs diff --git a/Dockerfile.env b/Dockerfile.env index e76a8a31..d409b603 100644 --- a/Dockerfile.env +++ b/Dockerfile.env @@ -1,11 +1,10 @@ # build environment used in .drone.yml # -# docker build --rm=true -t drone/golang -f Dockerfile.env . +# docker build --rm=true -t drone/golang:1.5 -f Dockerfile.env . -FROM gliderlabs/alpine:3.1 -RUN apk update && apk add ca-certificates curl git mercurial bzr perl openssh go && rm -rf /var/cache/apk/* - -ENV GOROOT /usr/lib/go -ENV GOPATH /drone -ENV GOBIN /drone/bin -ENV PATH $PATH:$GOROOT/bin:$GOPATH/bin +FROM golang:1.5 +ADD contrib/*.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/setup-sassc.sh && \ + chmod +x /usr/local/bin/setup-sqlite.sh && \ + /usr/local/bin/setup-sassc.sh && \ + /usr/local/bin/setup-sqlite.sh