Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
warrensbox committed Nov 25, 2019
2 parents 3a66f52 + 6789a3f commit 9462dad
Showing 1 changed file with 17 additions and 65 deletions.
82 changes: 17 additions & 65 deletions .circleci/config.yml
Expand Up @@ -9,101 +9,53 @@ jobs:

working_directory: /go/src/github.com/warrensbox/terraform-switcher

steps:
- checkout
- run: go get -v -t -d ./...
- run: go vet -tests=false ./...
- run: go test -v ./...
- run: mkdir -p build
- run: go build -v -o build/tfswitch

- persist_to_workspace:
root: build
paths: tfswitch

test-ubuntu:
docker:
- image: "circleci/ubuntu-server"

steps:

- run: ls

- attach_workspace:
at: build

test-alpine:
docker:
- image: "mhart/alpine-node"

steps:
- run: ls

develop-master:
docker:
- image: warrensbox/go-rb-py-aws

steps:
- checkout
- run:
command: |
echo "Placeholder"
# cd docs; bundle install --path vendor/bundler; bundle exec jekyll build -c _config.yml; cd ..
# git config user.email "warren.veerasingam@gmail.com"
# git config user.name "warrensbox"
# git add .
# git commit -m "Release Version"
# git push origin ${RELEASE_VERSION}
command: |
set +e
go get -v -t -d ./...
go vet -tests=false ./...
go test -v ./...
mkdir -p build
go build -v -o build/tfswitch
release:
docker:
- image: warrensbox/go-rb-py-aws
- image: circleci/golang:1.11

working_directory: /go/src/github.com/warrensbox/terraform-switcher

steps:
- checkout
- run:
command: |
set +e
set +e
source version
export RELEASE_VERSION;
RELEASE_VERSION=$RELEASE_VERSION.${CIRCLE_BUILD_NUM}
export RELEASE_VERSION;
echo $RELEASE_VERSION
go get -v -t -d ./...
mkdir -p /home/circleci/bin
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
export PATH="/home/warrensbox/bin:${PATH}"
rm -rf dist
git config user.email "warren.veerasingam@gmail.com"
git config user.name "warrensbox"
git tag -a ${RELEASE_VERSION} -m "Release Version"
git push origin ${RELEASE_VERSION}
curl -L https://git.io/goreleaser | VERSION=v0.76.1 bash
curl -L https://git.io/goreleaser | VERSION=v0.99.0 bash -s -- --rm-dist
cd docs; bundle install --path vendor/bundler; bundle exec jekyll build -c _config.yml; cd ..
workflows:
version: 2

build_and_test:
jobs:
- build
- test-ubuntu:
requires:
- build
- test-alpine:
requires:
- build
- develop-master:
requires:
- test-ubuntu
- test-alpine
filters:
branches:
only:
- master
- release
- release:
requires:
- develop-master
- build
filters:
branches:
only:
Expand Down

0 comments on commit 9462dad

Please sign in to comment.