forked from Blockstream/bitcoin-images
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
82 lines (73 loc) · 3 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
variables:
GIT_SUBMODULE_STRATEGY: none
CI_DISPOSABLE_ENVIRONMENT: "true"
image: docker:18.09.2
stages:
- build_gitian
- build_push
before_script:
- echo $DOCKERHUB_PW | docker login -u $DOCKERHUB_USER --password-stdin
- echo $PWD
build_bitcoind_gitian:
stage: build_gitian
only:
- /^bitcoind_gitian_v.*/
script:
- export BITCOIN_VERSION=$BITCOIN_VERSION
- export BITCOIN_DIR=$BITCOIN_DIR
- export USE_DOCKER=1
- apk update --no-cache && apk --no-cache add git curl gnupg ruby openssh coreutils
- git clone https://github.com/devrandom/gitian-builder.git gitian-git
- git clone https://github.com/bitcoin/bitcoin bitcoin-git
- (cd gitian-git && bin/make-base-vm --docker --suite bionic)
- sed -i 's#HOSTS=.*#HOSTS="x86_64-linux-gnu"#' /builds/devops/bitcoin-images/bitcoin-git/contrib/gitian-descriptors/gitian-linux.yml
- sed -i 's#CONFIGFLAGS=.*#CONFIGFLAGS="--without-gui --enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests"#' /builds/devops/bitcoin-images/bitcoin-git/contrib/gitian-descriptors/gitian-linux.yml
- sed -i 's#.*QT_RCC.*##g' /builds/devops/bitcoin-images/bitcoin-git/contrib/gitian-descriptors/gitian-linux.yml
- sed -i '0,/MAKEOPTS=(/{s/MAKEOPTS=(*/&NO_QT=1 /}' /builds/devops/bitcoin-images/gitian-git/bin/gbuild
- (cd gitian-git && bin/gbuild --num-make 8 --memory 8000 --url bitcoin=/builds/devops/bitcoin-images/bitcoin-git --commit bitcoin=${BITCOIN_VERSION} /builds/devops/bitcoin-images/bitcoin-git/contrib/gitian-descriptors/gitian-linux.yml)
- (cd gitian-git && tar -xzvf build/out/bitcoin-${BITCOIN_DIR}-x86_64-linux-gnu.tar.gz)
- ls -al /builds/devops/bitcoin-images/gitian-git/bitcoin-${BITCOIN_DIR}/bin/
- mkdir -p bitcoind/bitcoin
- cp -rf /builds/devops/bitcoin-images/gitian-git/bitcoin-${BITCOIN_DIR}/bin/* bitcoind/bitcoin
- ls -al bitcoind/bitcoin
- docker pull blockstream/bitcoind:latest
- (cd bitcoind && docker build --cache-from blockstream/bitcoind:latest -t blockstream/bitcoind:latest -t blockstream/bitcoind:${BITCOIN_VERSION} -f Dockerfile.gitian .)
- docker push blockstream/bitcoind:latest
- docker push blockstream/bitcoind:${BITCOIN_VERSION}
- sleep 3600
build_bitcoind:
stage: build_push
only:
- /^bitcoind_v.*/
script:
- cd bitcoind && ./build-and-push-to-dockerhub.sh
build_lightningd:
stage: build_push
only:
- /^lightningd_v.*/
script:
- cd lightningd && ./build-and-push-to-dockerhub.sh
build_charged:
stage: build_push
only:
- /^charged_v.*/
script:
- cd charged && ./build-and-push-to-dockerhub.sh
build_tor:
stage: build_push
only:
- /^tor_v.*/
script:
- cd tor && ./build-and-push-to-dockerhub.sh
build_gcloud_docker:
stage: build_push
only:
- /^gcloud_docker_v.*/
script:
- cd misc/gcloud-docker-tf && ./build-and-push-to-dockerhub.sh
build_certbot_gcs:
stage: build_push
only:
- /^certbot_gcs_v.*/
script:
- cd misc/certbot-gcs && ./build-and-push-to-dockerhub.sh