-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
33 lines (28 loc) · 862 Bytes
/
.gitlab-ci.yml
File metadata and controls
33 lines (28 loc) · 862 Bytes
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
image: docker:stable
stages:
- build
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_HUB_NAME: mediciland/flod
before_script:
- apk update && apk add curl zip unzip tar
- docker login -u $dockerhub_user -p $dockerhub_pass
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
Build:
stage: build
script:
- mkdir -p $CI_PROJECT_DIR/bin/
- docker build -t flod-build:$CI_COMMIT_REF_SLUG -f ci/Dockerfile.build .
- container_id=$(docker create flod-build:$CI_COMMIT_REF_SLUG)
- for EXE in addblock findcheckpoint floctl flod gencerts; do docker cp $container_id:/go/$EXE $CI_PROJECT_DIR/bin/$EXE; done
- docker rm -v $container_id
artifacts:
paths:
- bin/addblock
- bin/findcheckpoint
- bin/floctl
- bin/flod
- bin/gencerts