You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
senpy/.gitlab-ci.yml

81 lines
1.2 KiB
YAML

# Uncomment if you want to use docker-in-docker
# image: gsiupm/dockermake:latest
# services:
# - docker:dind
7 years ago
# When using dind, it's wise to use the overlayfs driver for
# improved performance.
7 years ago
variables:
7 years ago
IMAGENAME: $CI_REGISTRY_IMAGE
7 years ago
stages:
- test
- push
- deploy
- clean
7 years ago
before_script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
7 years ago
.test: &test_definition
stage: test
7 years ago
script:
- make -e test-$PYTHON_VERSION
7 years ago
test-3.5:
<<: *test_definition
variables:
PYTHON_VERSION: "3.5"
7 years ago
test-2.7:
<<: *test_definition
variables:
PYTHON_VERSION: "2.7"
7 years ago
.image: &image_definition
stage: push
7 years ago
script:
- make -e push-$PYTHON_VERSION
7 years ago
only:
- tags
- triggers
7 years ago
push-3.5:
7 years ago
<<: *image_definition
variables:
PYTHON_VERSION: "3.5"
7 years ago
push-2.7:
7 years ago
<<: *image_definition
variables:
PYTHON_VERSION: "2.7"
push-latest:
<<: *image_definition
7 years ago
variables:
PYTHON_VERSION: latest
only:
- master
- triggers
deploy:
stage: deploy
environment: test
script:
- make -e deploy
only:
- master
push-github:
stage: deploy
script:
- make -e push-github
only:
- master
- triggers
clean :
stage: clean
script:
- make -e clean
when: manual