Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Павел Литвиненко committed Feb 6, 2018
1 parent bb90a97 commit a7f3ad1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
23 changes: 11 additions & 12 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,37 @@
stages:
- builder
- build
variables:
GIT_SUBMODULE_STRATEGY: recursive
# NEXUS_USER:
# NEXUS_PASSWORD:
# NEXUS_HOST:
builder:
stage: builder
when: manual
services:
- docker:dind
before_script:
script:
- 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
script:
- docker tag yandex/clickhouse-builder $CI_REGISTRY/yandex/clickhouse-builder
- docker push $CI_REGISTRY/yandex/clickhouse-builder
tags:
- docker
build:
stage: build
when: manual
services:
- docker:dind
before_script:
- cd ./docker/builder
- docker info
- docker build -t yandex/clickhouse-builder .
script:
- 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
- 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
# # You can upload your binary to nexus
# after_script:
# - curl -v --keepalive-time 60 --keepalive --user "$NEXUS_USER:$NEXUS_PASSWORD" -XPUT "http://$NEXUS_HOST/repository/binaries/$CI_PROJECT_NAME" --upload-file ./dbms/src/Server/clickhouse
# You can upload your binary to nexus
- curl -v --keepalive-time 60 --keepalive --user "$NEXUS_USER:$NEXUS_PASSWORD" -XPUT "http://$NEXUS_HOST/repository/binaries/$CI_PROJECT_NAME" --upload-file ./dbms/src/Server/clickhouse
# Or download artifacts from gitlab
artifacts:
paths:
Expand Down
2 changes: 1 addition & 1 deletion docker/builder/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
build:
docker run --rm -v $(realpath ../..):/server -it yandex/clickhouse-builder
docker run --rm --workdir /server -v $(realpath ../..):/server -it yandex/clickhouse-builder

pull:
docker pull yandex/clickhouse-builder
Expand Down
2 changes: 0 additions & 2 deletions docker/builder/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ export CC=gcc-7
export CXX=g++-7

mkdir -p /server/build
cd /server/build

cmake /server
make -j $THREADS

0 comments on commit a7f3ad1

Please sign in to comment.