2016-09-08 21:13:10 +04:00
|
|
|
variables:
|
2017-01-22 04:59:18 +04:00
|
|
|
image_name: ocp_tezos
|
|
|
|
image_id: ${CI_BUILD_REF_NAME}
|
|
|
|
build_image_name: ${image_name}_build_deps
|
2016-09-08 21:13:10 +04:00
|
|
|
build_image_id: ${CI_BUILD_REF}
|
2017-01-26 12:58:21 +04:00
|
|
|
private_registry: registry.ocamlpro.com:8443
|
|
|
|
private_image_id: $private_registry/${CI_PROJECT_PATH}
|
|
|
|
public_image_id: docker.io/tezosledger/tezos:latest
|
2016-09-08 21:13:10 +04:00
|
|
|
|
2017-01-22 04:59:18 +04:00
|
|
|
image: ${build_image_name}:${build_image_id}
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- build_deps
|
|
|
|
- build
|
|
|
|
- build_test
|
|
|
|
- test
|
2016-11-26 02:10:32 +04:00
|
|
|
- expurge
|
2016-09-08 21:13:10 +04:00
|
|
|
- publish
|
|
|
|
- cleanup
|
|
|
|
|
|
|
|
build_deps:
|
|
|
|
stage: build_deps
|
|
|
|
image: ocp:docker
|
|
|
|
tags:
|
|
|
|
- docker_builder
|
|
|
|
script:
|
2017-01-22 04:59:18 +04:00
|
|
|
- ./scripts/create_build_deps_docker_image.sh
|
|
|
|
${build_image_name} ${build_image_id}
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
build:
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
2017-01-02 17:02:55 +04:00
|
|
|
- echo "PRODUCTION=yes" > src/Makefile.local
|
2016-09-08 21:13:10 +04:00
|
|
|
- make -j4
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
untracked: true
|
|
|
|
|
|
|
|
build:test:
|
|
|
|
stage: build_test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test build-test -j4
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
untracked: true
|
|
|
|
|
|
|
|
test:store:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-store
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:context:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-context
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:state:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-state
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:basic:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-basic
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:basic.sh:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-basic.sh
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
2016-10-19 17:09:00 +04:00
|
|
|
test:data-encoding:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-data-encoding
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
2017-01-14 16:14:22 +04:00
|
|
|
test:p2p-io-scheduler:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-p2p-io-scheduler
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:p2p-connection:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-p2p-connection
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
|
|
|
test:p2p-connection-pool:
|
|
|
|
stage: test
|
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
script:
|
|
|
|
- make -C test run-test-p2p-connection-pool
|
|
|
|
dependencies:
|
|
|
|
- build
|
|
|
|
- build:test
|
|
|
|
|
2017-01-22 04:59:18 +04:00
|
|
|
publish:docker:
|
|
|
|
stage: publish
|
|
|
|
image: ocp:docker
|
|
|
|
tags:
|
2017-01-26 12:58:21 +04:00
|
|
|
- public_docker_builder
|
2017-01-22 04:59:18 +04:00
|
|
|
script:
|
|
|
|
- ./scripts/create_docker_image.sh ${image_name} ${build_image_id}
|
|
|
|
- docker tag ${image_name}:${build_image_id}
|
2017-01-26 12:58:21 +04:00
|
|
|
"$private_image_id:$CI_BUILD_REF_NAME"
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $private_registry
|
|
|
|
- docker push "$private_image_id:$CI_BUILD_REF_NAME"
|
|
|
|
- docker rmi "$private_image_id:$CI_BUILD_REF_NAME"
|
|
|
|
- if [ "$CI_PROJECT_PATH" = "tezos/tezos" -a "$CI_BUILD_REF_NAME" = "master" ]; then
|
2017-01-26 17:04:46 +04:00
|
|
|
mkdir -p ~/.docker ;
|
2017-01-26 12:58:21 +04:00
|
|
|
echo "$CI_DOCKER_AUTH" > ~/.docker/config.json ;
|
|
|
|
docker tag ${image_name}:${build_image_id} ${public_image_id} ;
|
|
|
|
docker push ${public_image_id} ;
|
|
|
|
docker rmi ${public_image_id} ;
|
|
|
|
fi
|
2017-01-22 04:59:18 +04:00
|
|
|
|
|
|
|
publish:github:
|
|
|
|
image: ocaml/opam
|
|
|
|
stage: publish
|
2016-09-08 21:13:10 +04:00
|
|
|
tags:
|
|
|
|
- tezos_builder
|
|
|
|
only:
|
|
|
|
- master@tezos/tezos
|
|
|
|
script:
|
|
|
|
- echo "${CI_KH}" > ~/.ssh/known_hosts
|
2017-01-22 04:59:18 +04:00
|
|
|
- echo "${CI_PK_GITHUB}" > ~/.ssh/id_rsa
|
2016-09-08 21:13:10 +04:00
|
|
|
- chmod 400 ~/.ssh/id_rsa
|
|
|
|
- rm -fr .git/refs/original
|
|
|
|
- git filter-branch --prune-empty --index-filter
|
|
|
|
'git rm -r --cached --ignore-unmatch
|
|
|
|
.gitlab-ci.yml
|
|
|
|
"docs/proof of stake.md"
|
|
|
|
src/client/embedded/bootstrap/mining/'
|
|
|
|
--env-filter
|
2016-09-21 17:36:45 +04:00
|
|
|
'if [ $GIT_COMMIT != "f42e9d12ac75d2876a4cf600d44976b7090d4533" ] ; then
|
|
|
|
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" ;
|
|
|
|
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" ;
|
|
|
|
export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE" ;
|
|
|
|
export GIT_AUTHOR_NAME="Dynamic Ledger Solutions, Inc." ;
|
|
|
|
export GIT_AUTHOR_EMAIL="contact@tezos.com" ;
|
|
|
|
fi'
|
2016-09-08 21:13:10 +04:00
|
|
|
HEAD
|
2017-01-23 14:46:56 +04:00
|
|
|
- git push git@github.com:tezos/tezos.git -f HEAD:master
|
2016-09-08 21:13:10 +04:00
|
|
|
|
|
|
|
cleanup:
|
|
|
|
stage: cleanup
|
|
|
|
image: ocp:docker
|
|
|
|
tags:
|
|
|
|
- docker_builder
|
|
|
|
script:
|
2017-01-22 04:59:18 +04:00
|
|
|
- docker tag ${build_image_name}:${build_image_id}
|
|
|
|
${build_image_name}:${CI_PROJECT_NAMESPACE}_${CI_BUILD_REF_NAME}
|
|
|
|
- docker rmi ${build_image_name}:${build_image_id}
|
2016-09-08 21:13:10 +04:00
|
|
|
when: always
|
2017-01-26 12:58:21 +04:00
|
|
|
allow_failure: true
|