-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
53 lines (49 loc) · 2.46 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
stages:
- test
default:
tags:
- docker-exec
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:
TDSVER: "7.4"
QORE_DB_CONNSTR_FREETDS: 'freetds:test/test@rippy'
REPO_NAME: module-sybase
test-ubuntu:
stage: test
image: $CI_REGISTRY/infrastructure/qore-test-base/qore-test-base:develop
script:
- |
printf "[rippy]\n host = rippy\n port = 1433\n tds version = 7.4" > /etc/freetds/freetds.conf
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:
stage: test
image: $CI_REGISTRY/infrastructure/qore-test-base/qore-test-base:develop-alpine
script:
- |
printf "[rippy]\n host = rippy\n port = 1433\n tds version = 7.4" > /etc/freetds.conf
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