-
Cédric Krier authoredCédric Krier authored
.gitlab-ci.yml 2.95 KiB
stages:
- build
- test
- publish
.series:
variables:
LATEST: "6.6"
parallel:
matrix:
- SERIES: ["5.0", "6.0", "6.4", "6.6"]
build:
stage: build
tags:
- container-registry-push
extends: .series
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- /kaniko/executor
--context "${CI_PROJECT_DIR}/${SERIES}"
--dockerfile "${CI_PROJECT_DIR}/${SERIES}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}/tryton:${SERIES}-${CI_COMMIT_SHA}"
--tar-path image-${SERIES}.tar
artifacts:
paths:
- image-{$SERIES}.tar
build-office:
stage: build
extends: build
needs:
- build
script:
- /kaniko/executor
--build-arg REGISTRY_IMAGE="${CI_REGISTRY_IMAGE}"
--build-arg TAG_SUFFIX="-${CI_COMMIT_SHA}"
--context "${CI_PROJECT_DIR}/${SERIES}"
--dockerfile "${CI_PROJECT_DIR}/${SERIES}/office/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}/tryton:${SERIES}-office-${CI_COMMIT_SHA}"
--tar-path image-${SERIES}-office.tar
artifacts:
paths:
- image-{$SERIES}-office.tar
test:
stage: test
extends: .series
needs:
- build
image: ${CI_REGISTRY_IMAGE}/tryton:${SERIES}-${CI_COMMIT_SHA}
variables:
DB_CACHE: /tmp
TRYTOND_DATABASE_URI: sqlite://
script:
- python3 -m unittest discover -vv -f -s trytond.tests
- python3 -m unittest discover -vv -f -s trytond.modules -p test_module.py
parallel:
matrix:
- SERIES: ["6.4", "6.6"]
test-run:
extends: test
script:
- python3 -m trytond.tests.run-tests -vv -f -m --no-doctest
parallel:
matrix:
- SERIES: ["5.0", "6.0"]