-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
108 lines (98 loc) · 3.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
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
include:
- project: 'antwerpen/across/across-development'
file:
- '/gitlab-ci/docker.gitlab-ci.yml'
- '/gitlab-ci/common.gitlab-ci.yml'
- '/gitlab-ci/unit-tests.gitlab-ci.yml'
- '/gitlab-ci/unit-tests-docker.gitlab-ci.yml'
- '/gitlab-ci/integration-tests-docker.gitlab-ci.yml'
- '/gitlab-ci/deploy.gitlab-ci.yml'
variables:
NODEJS_DOCKER_IMAGE_VERSION: 12
.frontend:
stage: test
# TODO: node:16 does not work for ax-bootstrap-theme, but does for bootstrap-ui-module and entity-module:
# image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/node:16
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/node:${NODEJS_DOCKER_IMAGE_VERSION}
script:
- cd ${MODULE_NAME}/src/main/frontend
- yarn install
- yarn build:prod
frontend:bootstrap-ui-module:
extends:
- .frontend
variables:
MODULE_NAME: bootstrap-ui-module
artifacts:
paths:
- bootstrap-ui-module/src/main/resources/views/static/BootstrapUiModule/
frontend:entity-module:
extends:
- .frontend
variables:
MODULE_NAME: entity-module
artifacts:
paths:
- entity-module/src/main/resources/views/static/entity/
frontend:ax-bootstrap-theme:
extends:
- .frontend
variables:
MODULE_NAME: ax-bootstrap-theme
artifacts:
paths:
- ax-bootstrap-theme/src/main/resources/views/static/adminweb-themes/
- ax-bootstrap-4-utilities/src/main/resources/META-INF/resources/webjars/ax-bootstrap-4-utilities/0.0.1/css/
build:test-apps:
stage: test
needs:
- frontend:bootstrap-ui-module
- frontend:entity-module
# - frontend:ax-bootstrap-theme
script:
# - 'mvn $MAVEN_CLI_OPTS dependency:purge-local-repository -DmanualInclude=com.foreach -DreResolve=false'
- find $CI_PROJECT_DIR/.m2/repository/com/foreach/ -type d -name "*-SNAPSHOT" | xargs rm -rf || echo "No snapshots to delete"
- 'mvn $MAVEN_CLI_OPTS package -DskipTests'
artifacts:
when: always
paths:
- '*/target/*-exec.jar'
rules:
- if: $CI_COMMIT_TAG == null
.end2end:
stage: test
needs:
- build:test-apps
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:${DOCKER_VERSION}
services:
- name: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:${DOCKER_VERSION}-dind
alias: docker
command: [ "--tls=false" ]
before_script:
- docker login -u $CI_DEPENDENCY_PROXY_USER -p $CI_DEPENDENCY_PROXY_PASSWORD $CI_DEPENDENCY_PROXY_SERVER
script:
- cd $MODULE_NAME
- echo "DOCKER_REPOSITORY=${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}" > .env
- cat .env
- docker-compose --ansi=never up e2e
after_script:
- docker-compose down
artifacts:
when: always
reports:
junit:
- $MODULE_NAME/src/test/e2e/tests/cypress/out/*.xml
paths:
- $MODULE_NAME/src/test/e2e/tests/cypress/out/videos/
rules:
- if: $CI_COMMIT_TAG == null
end2end:bootstrap-ui-module:
extends:
- .end2end
variables:
MODULE_NAME: bootstrap-ui-module-test
end2end:entity-module:
extends:
- .end2end
variables:
MODULE_NAME: entity-module-test-application