出自这个GitHub:https://github.com/nanoporetech/scrappie/blob/master/.gitlab-ci.yml
# Yaml CI config for Gitlab See. http://docs.gitlab.com/ce/ci/yaml/README.html
# Machine image on which to build, test etc
image: ${IMAGE_HOST}/algorithm/scrappie_docker:14.04-latest
variables:
REPO_DEVELOPMENT: "trusty-unstable"
REPO_STAGING: "trusty-testing"
REPO_PRODUCTION: "trusty-stable"
CI_VERSION_PATCH: $CI_BUILD_ID
BUILD_DIR: "build"
stages:
- build
- test
- publish
building:
stage: build
script:
- mkdir ${BUILD_DIR} && (cd ${BUILD_DIR} && cmake .. && make && make package)
except:
# Don't test tags (just branches)
#- tags
artifacts:
paths:
- ${BUILD_DIR}/*.deb
- ${BUILD_DIR}/scrappie
- ${BUILD_DIR}/scrappie_unittest
- ${BUILD_DIR}/libscrappie.so
- ${BUILD_DIR}/libscrappie.a
- ${BUILD_DIR}/Makefile
- ${BUILD_DIR}/CTestTestfile.cmake
- ${BUILD_DIR}/CMakeFiles/scrappie_test.dir/
build-manylinux:
stage: build
image: docker-registry.oxfordnanolabs.local:5000/ont-base-docker
script:
- docker run --rm -v `pwd`:/io ontresearch/manylinux1_x86_64_openblas /io/python/build-wheels.sh
artifacts:
paths:
- python/wheelhouse/scrappie*.whl
testing:
stage: test
script:
- cd ${BUILD_DIR} && make test
artifacts:
when: always
paths:
- ${BUILD_DIR}/Testing
upload-development:
stage: publish
script:
- echo "$SSH_PRIVATE_KEY" > .privkey
- chmod 600 .privkey
- scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
variables:
REPO: $REPO_DEVELOPMENT
only:
- dev
upload-staging:
stage: publish
script:
- echo "$SSH_PRIVATE_KEY" > .privkey
- chmod 600 .privkey
- scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
variables:
REPO: $REPO_STAGING
only:
- master
upload-prod:
stage: publish
script:
- echo "$SSH_PRIVATE_KEY" > .privkey
- chmod 600 .privkey
- scp -o StrictHostKeyChecking=no -i .privkey ${BUILD_DIR}/*.deb ${REPO_HOST}:/var/www/apt/$REPO/
variables:
REPO: $REPO_PRODUCTION
only:
- /^release-\d+\.\d+(?:.\d+)?(?:-\d+)?$/ # use regexp
GitHubID:shiyi23
践行 活在当下 的理念