Skip to content
This repository was archived by the owner on Mar 27, 2023. It is now read-only.

Commit d60a3f5

Browse files
author
Brian Caffey
committed
use gitlab registry for e2e job instead of localhost registry, make duplicate job for local testing
1 parent 9073a79 commit d60a3f5

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.gitlab-ci.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ variables:
8181
-f nginx/ci/Dockerfile .
8282
- docker push $CI_REGISTRY_IMAGE/frontend:latest
8383

84-
.Build backend:
84+
Build backend:
8585
stage: build
8686
image: docker:stable
8787
variables:
@@ -106,9 +106,9 @@ variables:
106106
- echo "Build backend complete"
107107

108108
# gitlab-runner exec docker "e2e cypress tests without docker-compose"
109-
e2e cypress tests without docker-compose:
109+
e2e cypress tests without docker-compose: &cypress
110110
stage: integration
111-
image: localhost:5000/backend:latest
111+
image: $CI_REGISTRY_IMAGE/backend:latest
112112
services:
113113
- postgres:latest
114114
- redis:latest
@@ -137,10 +137,14 @@ e2e cypress tests without docker-compose:
137137
- $(npm bin)/cypress run # --spec "cypress/integration/test_ws_connection.js"
138138
artifacts:
139139
paths:
140-
- cypress/videos/
141-
- tests/screenshots/
140+
- backend/cypress/videos/
141+
- backend/cypress/screenshots/
142142
expire_in: 7 days
143143

144+
.e2e cypress tests no compose local:
145+
<<: *cypress
146+
image: localhost:5000/backend:latest
147+
144148
.e2e cypress tests with docker-compose:
145149
stage: integration
146150
image: docker:stable
@@ -164,6 +168,9 @@ e2e cypress tests without docker-compose:
164168
- tests/screenshots/
165169
expire_in: 7 days
166170

171+
# this doesn't work because services are not available to eachother,
172+
# services can only be accessed from the job's container
173+
# https://gitlab.com/gitlab-org/gitlab-selenium-server/issues/1#note_196708019
167174
.e2e: &e2e
168175
image: cypress/base:8
169176
stage: integration

0 commit comments

Comments
 (0)