Skip to content

Update circleci for e2e #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 13 additions & 39 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,8 @@ jobs:
command: |
find . -type f -name '*.sh' | wc -l
find . -type f -name '*.sh' | xargs shellcheck -e SC2086 -e SC1090 --external-sources
e2e:
docker:
- image: circleci/golang:1.11.5
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Test Image
command: |
docker login -u $docker_user -p $docker_password
make e2e

build-deploy:
build-deploy-e2e:
docker:
- image: circleci/golang:1.11.5
steps:
Expand All @@ -34,12 +22,17 @@ jobs:
name: Create docker image
command: make build
- run:
name: Logg into Docker registry
command: docker login -u $docker_release_user -p $docker_release_password
name: Run E2E Test
command: make e2e
- run:
name: Publish docker image
command: make push

name: Push docker image
command: |
if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ "${CIRCLE_PROJECT_USERNAME}" = "solidnerd" ]] ; then
echo $docker_password | docker login --username $docker_user --password-stdin
make push
else
echo "Do not push image"
fi
release:
docker:
- image: circleci/golang:1.11.5
Expand All @@ -55,31 +48,12 @@ jobs:

workflows:
version: 2
verify:
jobs:
- shellcheck:
filters:
branches:
ignore:
- master
- build-deploy:
filters:
branches:
ignore:
- master
- e2e:
requires:
- build-deploy
deploy:
build-and-verify:
jobs:
- shellcheck
- build-deploy:
- build-deploy-e2e:
requires:
- shellcheck
filters:
branches:
only:
- master
release:
jobs:
- release:
Expand Down