-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
38 lines (33 loc) · 1.04 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
variables:
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- if [ ! -z "${CI_COMMIT_SHA}" ]; then export APP_VERSION="${CI_COMMIT_SHA:0:8}"; fi
- if [ ! -z "${CI_COMMIT_TAG}" ]; then export APP_VERSION="${CI_COMMIT_TAG}"; fi
cache:
key: "${CI_COMMIT_REF_SLUG}"
paths:
- .gradle/wrapper
- .gradle/caches
stages:
- test
test:
stage: test
image: gaoermai/docker:18.09.8-openjdk11-001
services:
- docker:20.10.7-dind
script:
- apk add --no-cache build-base nss libffi-dev openssl-dev npm
- cd frontend && npm install && ( npm run ci-serve & )
- cd ..
- IP=$(bash env/setup_docker.sh docker)
- echo $IP
- export HOST_NAME=$(hostname -i)
- echo $HOST_NAME
- cat /etc/hosts
- export HOST_PORT=8080
- cd env && ./dc_pc up -d && cd ..
- ./gradlew bootRun -x npmSetup -x npmInstall -x nodeSetup -x :frontend:clean -x :frontend:npmBuild &
- git clone https://github.com/nerds-odd-e/atdd-v2-web-e2e.git
- cd atdd-v2-web-e2e
- ./gradlew cucumber