From f1b2ea069dbc401f64255886c1f06ef302d8aa00 Mon Sep 17 00:00:00 2001 From: Chris Brown Date: Sat, 31 Jan 2015 23:06:07 +0000 Subject: [PATCH] add ci infrastructure --- Dockerfile | 11 +++++++++++ build.yml | 9 +++++++++ scripts/build | 4 ++++ scripts/test | 18 ++++++++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 Dockerfile create mode 100644 build.yml create mode 100755 scripts/build create mode 100755 scripts/test diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f0f24c9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM progrium/busybox + +RUN opkg-install ca-certificates + +# satisfy go crypto/x509 +RUN for cert in `ls -1 /etc/ssl/certs/*.crt | grep -v /etc/ssl/certs/ca-certificates.crt`; \ + do cat "$cert" >> /etc/ssl/certs/ca-certificates.crt; \ + done + +ADD built-check /opt/resource/check +ADD built-out /opt/resource/out diff --git a/build.yml b/build.yml new file mode 100644 index 0000000..fe3969c --- /dev/null +++ b/build.yml @@ -0,0 +1,9 @@ +--- +image: docker:///concourse/static-golang + +inputs: + - name: github-release-resource + path: gopath/src/github.com/concourse/github-release-resource + +run: + path: gopath/src/github.com/concourse/github-release-resource/scripts/test diff --git a/scripts/build b/scripts/build new file mode 100755 index 0000000..68caade --- /dev/null +++ b/scripts/build @@ -0,0 +1,4 @@ +#!/bin/bash + +go build -o built-out ./cmd/out +go build -o built-check ./cmd/check diff --git a/scripts/test b/scripts/test new file mode 100755 index 0000000..750154d --- /dev/null +++ b/scripts/test @@ -0,0 +1,18 @@ +#!/bin/bash +# vim: set ft=sh + +set -e + +export GOPATH=$PWD/gopath +export PATH=$GOPATH/bin:$PATH + +cd $GOPATH/src/github.com/concourse/github-release-resource + +export GOPATH=${PWD}/Godeps/_workspace:$GOPATH +export PATH=${PWD}/Godeps/_workspace/bin:$PATH + +go install github.com/onsi/ginkgo/ginkgo + +ginkgo -r -p "$@" + +./scripts/build