-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.gitlab-ci.yml
107 lines (101 loc) · 4.55 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
stages:
- test
default:
services:
- name: dnhsoft/mysql-utf8:5.7-mb4
alias: mysql
before_script:
- |
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"pending\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
- set +e
variables:
REPO_NAME: qore
POSTGRES_PASSWORD: omq
TZ: 'Europe/Prague'
PGTZ: 'Europe/Prague'
TDSVER: "7.3"
MYSQL_DATABASE: omq
MYSQL_ROOT_PASSWORD: omq
QORE_DB_CONNSTR_MYSQL: 'mysql:root/omq@omq(UTF8)%mysql'
test-ubuntu-amd64:
stage: test
image: $CI_REGISTRY/infrastructure/qore-test-base/qore-test-base:develop
tags:
- amd64
variables:
QORE_DB_CONNSTR_FREETDS: 'freetds:test/test@rippy'
script:
- |
if test/docker_test/test-ubuntu.sh; then
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"success\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
exit 0
else
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"failure\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
exit 1
fi
test-ubuntu-arm64:
stage: test
image: $CI_REGISTRY/infrastructure/qore-test-base/qore-test-base:develop-arm64
tags:
- arm64
variables:
QORE_DB_CONNSTR_FREETDS: 'freetds:test/test@rippy'
script:
- |
if test/docker_test/test-ubuntu.sh; then
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"success\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
exit 0
else
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"failure\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
exit 1
fi
test-alpine-amd64:
stage: test
image: $CI_REGISTRY/infrastructure/qore-test-base/qore-test-base:develop-alpine
tags:
- amd64
variables:
QORE_DB_CONNSTR_FREETDS: 'freetds:test/test@rippy'
script:
- |
if test/docker_test/test-alpine.sh; then
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"success\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
exit 0
else
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"failure\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
exit 1
fi
test-alpine-arm64:
stage: test
image: $CI_REGISTRY/infrastructure/qore-test-base/qore-test-base:develop-alpine-arm64
tags:
- arm64
variables:
QORE_DB_CONNSTR_FREETDS: 'freetds:test/test@rippy'
script:
- |
if test/docker_test/test-alpine.sh; then
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"success\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
exit 0
else
curl "https://api.github.com/repos/qorelanguage/${REPO_NAME}/statuses/${CI_COMMIT_SHA}" \
-X POST -u omusil24:${GITHUB_ACCESS_TOKEN} -H "Content-Type: application/json" \
-d "{\"state\": \"failure\", \"context\": \"${REPO_NAME}\", \"description\": \"Gitlab CI\", \"target_url\": \"${CI_JOB_URL}\"}"
exit 1
fi