Skip to content

Commit

Permalink
Added CI/CD - WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeemster committed Sep 13, 2016
1 parent 6ec0759 commit 2538084
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 12 deletions.
35 changes: 35 additions & 0 deletions .deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
local:
root_dir : <%= ENV['TRAVIS_BUILD_DIR'] %>
targets:
- type : "bintray"
user : <%= ENV['BINTRAY_SNOWPLOW_GENERIC_USER'] %>
password : <%= ENV['BINTRAY_SNOWPLOW_GENERIC_API_KEY'] %>
packages:
- repo : "snowplow-generic"
name : "sql-runner"
user_org : "snowplow"
publish : true
override : false
version : "0.5.0-rc1"
build_version : <%= ENV['TRAVIS_TAG'] %>
build_commands:
- gox -osarch=linux/amd64 -output=dist/linux/sql-runner
- gox -osarch=darwin/amd64 -output=dist/darwin/sql-runner
- gox -osarch=windows/amd64 -output=dist/windows/sql-runner
artifacts:
- prefix : "sql_runner_"
suffix : "_linux_amd64"
type : "zip"
binary_paths:
- dist/linux/sql-runner
- prefix : "sql_runner_"
suffix : "_darwin_amd64"
type : "zip"
binary_paths:
- dist/darwin/sql-runner
- prefix : "sql_runner_"
suffix : "_windows_amd64"
type : "zip"
binary_paths:
- dist/windows/sql-runner.exe
38 changes: 26 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,35 @@
language: go
go:
- 1.4
install:
- export PATH=$PATH:$HOME/gopath/bin
- go get -v -u github.com/kr/godep
- godep get
- godep go build -v ./...
- 1.4
- 1.5
- 1.6

before_script:
- ./integration/setup_travis.sh
- ./integration/setup_travis.sh

script:
- godep go test -i ./...
- godep go test ./...
- test -z "$(go fmt ./...)"
- godep go build -v
- ./integration/run_tests.sh
- go test -i ./...
- go test ./...
- test -z "$(go fmt ./...)"
- go build
- ./integration/run_tests.sh

before_deploy:
- go get github.com/mitchellh/gox
- pip install --user pyyaml
- pip install --user -i https://testpypi.python.org/pypi release-manager==0.1.0-rc1

deploy:
skip_cleanup: true
provider: script
script: release-manager --config .deploy.yml --check-version --make-version --make-artifact --upload-artifact
on:
condition: '"${TRAVIS_GO_VERSION}" == "1.6"'
tags: true

addons:
postgresql: '9.3'

env:
global:
- secure: eP2CEhjE6YEgajudRcW6Lsyy92IxAB1KS5Cw0p/defwpouSuZS4NF8+YjcUhfI9sbkobL6KGaL12CYqLWToepQpiDHJ1eRaH+/8HQ+kgqwLxmHptVlqEXhkQPVJL04MvxZqeXocuOluGlWHOHMdlmDTA7eI/tKJtyykIRKyXFAc=
Expand Down

0 comments on commit 2538084

Please sign in to comment.