Skip to content

Commit

Permalink
Merge pull request #246 from warrensbox/fix/Fail_CircleCI_pipeline_on…
Browse files Browse the repository at this point in the history
…_errors

[Fix] Fail CircleCI pipeline on errors
  • Loading branch information
warrensbox committed May 27, 2022
2 parents 6583c47 + 518152c commit 73ca476
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:

steps:
- checkout
- run:
command: |
set +e
- run:
command: |
set -e
echo "Building website"
sudo apt-get update
sudo apt-get install python3 python3-pip
Expand All @@ -22,13 +22,15 @@ jobs:
mkdocs gh-deploy --force
cd ..
echo "Building application"
echo "Building application"
go get -v -t -d ./...
go vet -tests=false ./...
go test -v ./...
mkdir -p build
go build -v -o build/tfswitch
find ./test-data/* -type d | xargs -n 1 ./build/tfswitch -c
find ./test-data/* -type d -print0 | while read -r -d $'\0' TEST_PATH; do
./build/tfswitch -c "${TEST_PATH}" || exit 1
done
release:
docker:
Expand All @@ -38,11 +40,11 @@ jobs:

steps:
- checkout
- run:
- run:
command: |
set +e
set -e
source version
export RELEASE_VERSION;
export RELEASE_VERSION;
RELEASE_VERSION=$RELEASE_VERSION.${CIRCLE_BUILD_NUM}
export RELEASE_VERSION;
echo $RELEASE_VERSION
Expand All @@ -54,7 +56,7 @@ jobs:
git tag -a ${RELEASE_VERSION} -m "Release Version"
git push origin ${RELEASE_VERSION}
curl -sL https://git.io/goreleaser | bash
workflows:
version: 2

Expand All @@ -70,6 +72,6 @@ workflows:
- build
filters:
branches:
only:
only:
- release

0 comments on commit 73ca476

Please sign in to comment.