Skip to content

Commit d58939c

Browse files
authored
Merge pull request solidnerd#129 from solidnerd/update-circleci
Update circleci for e2e
2 parents 1a0e6b8 + ebe19c7 commit d58939c

File tree

1 file changed

+13
-39
lines changed

1 file changed

+13
-39
lines changed

.circleci/config.yml

Lines changed: 13 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,8 @@ jobs:
1010
command: |
1111
find . -type f -name '*.sh' | wc -l
1212
find . -type f -name '*.sh' | xargs shellcheck -e SC2086 -e SC1090 --external-sources
13-
e2e:
14-
docker:
15-
- image: circleci/golang:1.11.5
16-
steps:
17-
- checkout
18-
- setup_remote_docker:
19-
docker_layer_caching: true
20-
- run:
21-
name: Test Image
22-
command: |
23-
docker login -u $docker_user -p $docker_password
24-
make e2e
2513
26-
build-deploy:
14+
build-deploy-e2e:
2715
docker:
2816
- image: circleci/golang:1.11.5
2917
steps:
@@ -34,12 +22,17 @@ jobs:
3422
name: Create docker image
3523
command: make build
3624
- run:
37-
name: Logg into Docker registry
38-
command: docker login -u $docker_release_user -p $docker_release_password
25+
name: Run E2E Test
26+
command: make e2e
3927
- run:
40-
name: Publish docker image
41-
command: make push
42-
28+
name: Push docker image
29+
command: |
30+
if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ "${CIRCLE_PROJECT_USERNAME}" = "solidnerd" ]] ; then
31+
echo $docker_password | docker login --username $docker_user --password-stdin
32+
make push
33+
else
34+
echo "Do not push image"
35+
fi
4336
release:
4437
docker:
4538
- image: circleci/golang:1.11.5
@@ -55,31 +48,12 @@ jobs:
5548
5649
workflows:
5750
version: 2
58-
verify:
59-
jobs:
60-
- shellcheck:
61-
filters:
62-
branches:
63-
ignore:
64-
- master
65-
- build-deploy:
66-
filters:
67-
branches:
68-
ignore:
69-
- master
70-
- e2e:
71-
requires:
72-
- build-deploy
73-
deploy:
51+
build-and-verify:
7452
jobs:
7553
- shellcheck
76-
- build-deploy:
54+
- build-deploy-e2e:
7755
requires:
7856
- shellcheck
79-
filters:
80-
branches:
81-
only:
82-
- master
8357
release:
8458
jobs:
8559
- release:

0 commit comments

Comments
 (0)