nk20/.gitlab-ci.yml

61 lines
1.7 KiB
YAML
Raw Normal View History

2019-07-08 10:55:48 +00:00
stages:
2020-09-01 15:33:03 +00:00
- build_docker_image
2019-07-08 10:55:48 +00:00
- test
2020-02-18 19:58:01 +00:00
- quality-assurance
2019-07-08 10:55:48 +00:00
2020-09-01 15:33:03 +00:00
docker:
stage: build_docker_image
2020-09-01 15:59:56 +00:00
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
2020-09-01 15:33:03 +00:00
script:
2020-09-01 15:59:56 +00:00
- mkdir -p /kaniko/.docker
2020-09-01 17:59:52 +00:00
- echo "{\"auths\":{\"https://index.docker.io/v1/\":{\"auth\":\"$CI_BUILD_TOKEN\"}}}" > /kaniko/.docker/config.json
2020-09-01 20:22:36 +00:00
- /kaniko/executor --cache=true --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:latest --destination $CI_REGISTRY_IMAGE:debian
2020-09-01 15:33:03 +00:00
only:
- master
- beta
2020-09-01 20:25:16 +00:00
cache:
key: one-key-to-rule-them-all
2020-09-01 20:26:34 +00:00
paths:
- /cache/
2020-09-01 15:33:03 +00:00
2020-09-01 13:13:08 +00:00
# Debian Buster
2020-02-18 19:58:01 +00:00
py37-django22:
2019-07-08 10:55:48 +00:00
stage: test
2020-09-01 20:42:56 +00:00
image:
name: $CI_REGISTRY_IMAGE:debian
entrypoint: [""]
2020-09-01 13:19:06 +00:00
before_script:
2020-09-01 20:17:48 +00:00
- apt-get update && apt-get install -y tox
2020-09-01 13:19:06 +00:00
script: tox -e py37-django22
2019-07-08 10:55:48 +00:00
2020-09-01 13:13:08 +00:00
# Ubuntu 20.04
py38-django22:
stage: test
2020-09-01 13:13:08 +00:00
image: ubuntu:20.04
2020-09-01 13:19:06 +00:00
before_script:
2020-09-01 13:42:00 +00:00
# Fix tzdata prompt
- ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime && echo Europe/Paris > /etc/timezone
2020-09-01 13:19:06 +00:00
- >
apt-get update &&
apt-get install -y python3-django python3-django-crispy-forms
python3-django-extensions python3-django-filters python3-django-polymorphic
python3-djangorestframework python3-django-cas-server python3-psycopg2 python3-pil
python3-babel python3-lockfile python3-pip python3-phonenumbers ipython3
gettext libjs-bootstrap4 fonts-font-awesome tox &&
rm -rf /var/lib/apt/lists/*
script: tox -e py38-django22
2019-07-08 10:55:48 +00:00
linters:
2020-02-18 19:58:01 +00:00
stage: quality-assurance
2020-09-01 20:42:56 +00:00
image:
name: $CI_REGISTRY_IMAGE:debian
entrypoint: [""]
2020-09-01 13:19:06 +00:00
before_script:
2020-09-01 20:17:48 +00:00
- apt-get update && apt-get install -y tox
2019-07-08 10:55:48 +00:00
script: tox -e linters
2020-02-18 19:58:01 +00:00
# Be nice to new contributors, but please use `tox`
allow_failure: true