Skip to content

Commit 12b9d6d

Browse files
committed
Add .gitlab-ci.yml
1 parent 45ec071 commit 12b9d6d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.gitlab-ci.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# This file is used to build and test `lightningd`
2+
3+
# Image automatically built by https://github.com/cdecker/dockerfiles/tree/master/lightning/ci
4+
image: cdecker/lightning-ci:latest
5+
6+
build:
7+
stage: build
8+
before_script:
9+
- >-
10+
curl -s -H "Authorization: token $GITHUB_STATUS_TOKEN"
11+
-X POST
12+
--data '{"state": "pending", "description": "Gitlab-CI is building the commit", "context": "gitlab-ci"}'
13+
https://api.github.com/repos/ElementsProject/lightning/statuses/$CI_BUILD_REF || true
14+
script:
15+
- make
16+
- make -j 12 check
17+
- make check-source
18+
19+
artifacts:
20+
paths:
21+
- daemon/lightningd
22+
- daemon/lightning-cli
23+
24+
update-status-fail:
25+
image: tutum/curl
26+
stage: deploy
27+
when: on_failure
28+
script:
29+
- >-
30+
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_BUILD_ID.", "context": "gitlab-ci"}' https://api.github.com/repos/ElementsProject/lightning/statuses/$CI_BUILD_REF || true
31+
32+
update-status-success:
33+
image: tutum/curl
34+
stage: deploy
35+
when: on_success
36+
script:
37+
- >-
38+
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_BUILD_REF || true

0 commit comments

Comments
 (0)