forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
38 lines (33 loc) · 1.39 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
# This file is used to build and test `lightningd`
# Image automatically built by https://github.com/cdecker/dockerfiles/tree/master/lightning/ci
image: cdecker/lightning-ci:latest
build:
stage: build
before_script:
- >-
curl -s -H "Authorization: token $GITHUB_STATUS_TOKEN"
-X POST
--data '{"state": "pending", "description": "Gitlab-CI is building the commit", "context": "gitlab-ci"}'
https://api.github.com/repos/ElementsProject/lightning/statuses/$CI_COMMIT_SHA || true
script:
- make
- make -j 12 check
- make check-source
artifacts:
paths:
- daemon/lightningd
- daemon/lightning-cli
update-status-fail:
image: tutum/curl
stage: deploy
when: on_failure
script:
- >-
curl -s -H "Authorization: token $GITHUB_STATUS_TOKEN" -X POST --data '{"state": "failure", "description": "Gitlab-CI build failed, please contact @cdecker for details about build #$CI_JOB_ID.", "context": "gitlab-ci"}' https://api.github.com/repos/ElementsProject/lightning/statuses/$CI_COMMIT_SHA || true
update-status-success:
image: tutum/curl
stage: deploy
when: on_success
script:
- >-
curl -s -H "Authorization: token $GITHUB_STATUS_TOKEN" -X POST --data '{"state": "success", "description": "Gitlab-CI build succeeded.", "context": "gitlab-ci"}' https://api.github.com/repos/ElementsProject/lightning/statuses/$CI_COMMIT_SHA || true