-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
93 lines (89 loc) · 2.13 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
stages:
- build
- test
- deploy
build-develop:
except:
- master
- tags
stage: build
tags:
- BaseX-9.2
variables:
GIT_STRATEGY: clone
GIT_CLONE_PATH: $CI_BUILDS_DIR/openapi4restxq
script:
- pwd
- cd $GIT_CLONE_PATH
- yarn install
# - ant test
# artifacts:
# paths:
# - build/*.xar
# - test/
#build-master:
# only:
# - master
# stage: build
# script:
# - cp master.build.properties local.build.properties
# - npm install
# - ant test
# artifacts:
# paths:
# - build/*.xar
# - test/
#
installation:
except:
- master
- tags
stage: test
tags:
- BaseX-9.2
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/openapi4restxq
script:
- cd $GIT_CLONE_PATH
- yarn install
- |
patch -p0 <<EOF
--- resources/swagger-ui-dist/index.html 2019-05-28 16:35:33.341000000 +0200
+++ index.html 2019-05-28 17:48:45.573077200 +0200
@@ -41,3 +41,3 @@
const ui = SwaggerUIBundle({
- url: "https://petstore.swagger.io/v2/swagger.json",
+ url: "openapi.json",
dom_id: '#swagger-ui',
EOF
- mkdir screenshots-actual
- mkdir screenshots-diff
- cd screenshots-actual
- chromium-browser --headless --disable-gpu --no-sandbox --screenshot --window-size=1280,1696 --virtual-time-budget=10000 http://localhost:8984/openapi
- mv screenshot.png openapi4restxq.png
- diffpng --output ../screenshots-diff/openapi4restxq openapi4restxq.png ../screenshots/openapi4restxq.png
artifacts:
when: on_failure
expire_in: 1 day
paths:
- $GIT_CLONE_PATH/screenshots-actual
- $GIT_CLONE_PATH/screenshots-diff
clean-testbench:
stage: deploy
tags:
- BaseX-9.2
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/openapi4restxq
script:
- rm -rf $GIT_CLONE_PATH*
- mkdir -p $GIT_CLONE_PATH
#upload:
# only:
# - master
# - develop
# except:
# - tags
# stage: deploy
# script:
# - FILENAME=$(ls build/*.xar)
# - curl -u ci:${EXIST_UPLOAD_PW} -X POST -F file=@${FILENAME} https://ci.de.dariah.eu/exist-upload