2018-02-01 11:26:44 +00:00
|
|
|
stages:
|
2018-02-06 10:13:44 +00:00
|
|
|
- builder
|
2018-02-01 11:26:44 +00:00
|
|
|
- build
|
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
|
|
builder:
|
|
|
|
stage: builder
|
|
|
|
when: manual
|
|
|
|
services:
|
|
|
|
- docker:dind
|
2018-02-06 10:13:44 +00:00
|
|
|
script:
|
2018-02-01 11:26:44 +00:00
|
|
|
- docker info
|
|
|
|
- apk add --no-cache git curl binutils ca-certificates
|
|
|
|
- docker login -u gitlab -p nopasswd $CI_REGISTRY
|
|
|
|
- docker build -t yandex/clickhouse-builder ./docker/builder
|
|
|
|
- docker tag yandex/clickhouse-builder $CI_REGISTRY/yandex/clickhouse-builder
|
|
|
|
- docker push $CI_REGISTRY/yandex/clickhouse-builder
|
|
|
|
tags:
|
|
|
|
- docker
|
|
|
|
build:
|
|
|
|
stage: build
|
2018-02-06 10:13:44 +00:00
|
|
|
when: manual
|
2018-02-01 11:26:44 +00:00
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
script:
|
2018-02-06 10:13:44 +00:00
|
|
|
- apk add --no-cache git curl binutils ca-certificates
|
|
|
|
- git submodule sync --recursive
|
|
|
|
- git submodule update --init --recursive
|
|
|
|
- docker info
|
|
|
|
- docker login -u gitlab -p nopasswd $CI_REGISTRY
|
|
|
|
- docker pull $CI_REGISTRY/yandex/clickhouse-builder
|
2018-02-01 11:26:44 +00:00
|
|
|
- docker run --rm --volumes-from "${HOSTNAME}-build" --workdir "${CI_PROJECT_DIR}" --env CI_PROJECT_DIR=${CI_PROJECT_DIR} $CI_REGISTRY/yandex/clickhouse-builder /build_gitlab_ci.sh
|
2018-02-06 10:13:44 +00:00
|
|
|
# You can upload your binary to nexus
|
2020-04-01 23:51:21 +00:00
|
|
|
- curl -v --keepalive-time 60 --keepalive --user "$NEXUS_USER:$NEXUS_PASSWORD" -XPUT "http://$NEXUS_HOST/repository/binaries/$CI_PROJECT_NAME" --upload-file ./dbms/Server/clickhouse
|
2018-02-01 11:26:44 +00:00
|
|
|
# Or download artifacts from gitlab
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2020-04-01 23:51:21 +00:00
|
|
|
- ./dbms/Server/clickhouse
|
2018-02-01 11:26:44 +00:00
|
|
|
expire_in: 1 day
|
|
|
|
tags:
|
2020-04-01 23:51:21 +00:00
|
|
|
- docker
|