-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
69 lines (62 loc) · 1.83 KB
/
.gitlab-ci.yml
File metadata and controls
69 lines (62 loc) · 1.83 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# File: keycloak-event-gateway/.gitlab-ci.yml
image: registry.gitlab.com/avcompris/kalisio/avc-kalisio-workspace/avcompris/kalisio-workspace
variables:
# MAVEN_CLI_OPTS: "-s .gitlab-ci/settings.xml --batch-mode --errors --fail-at-end --show-version"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
MAVEN_OPTS: "-Dmaven.repo.local=${CI_PROJECT_DIR}/.m2/repository -Djava.awt.headless=true"
MAVEN_PROFILE: gitlab
DOCKER_HOST: tcp://172.17.0.1:2375
cache:
key: ALL
paths:
- .m2/repository/
stages:
- build
- push
- test
maven:
stage: build
only:
refs:
- master
script:
- mvn ${MAVEN_CLI_OPTS} -P${MAVEN_PROFILE} clean install
docker_build:
stage: build
only:
refs:
- master
script:
- ./build.sh
docker_push:
stage: push
only:
refs:
- master
script:
- echo "${CI_REGISTRY_PASSWORD}" | docker login -u "${CI_REGISTRY_USER}" --password-stdin registry.gitlab.com
- docker tag kalisio/keycloak-event-gateway registry.gitlab.com/avcompris/kalisio/keycloak-event-gateway/kalisio/keycloak-event-gateway
- docker push registry.gitlab.com/avcompris/kalisio/keycloak-event-gateway/kalisio/keycloak-event-gateway
mocha:
stage: test
only:
refs:
- master
artifacts:
when: always
paths:
- test/screenshots
before_script:
- cd ${CI_PROJECT_DIR}/test
- docker-compose down
- docker-compose up -d
- ../scripts/wait_for_docker_container.sh test_keycloak_1 "Running the server in development mode."
- ../scripts/wait_for_docker_container.sh test_selenium_1 "Started Selenium Standalone"
script:
- cd ${CI_PROJECT_DIR}/test
- npm install
- export SELENIUM_REMOTE_URL=http://172.17.0.1:4444/wd/hub
- npx mocha integration_tests.js
after_script:
- cd ${CI_PROJECT_DIR}/test
- docker-compose down