Commit 4f52903b authored by Arthur Lutz's avatar Arthur Lutz
Browse files

[.gitlab-ci] include templates (kaniko) and add deploy

parent 3be5b9e7ab0e
Pipeline #54310 failed
---
image: python:3.7
include:
- project: "open-source/gitlab-templates"
ref: "branch/default"
file: # the stages are:
- "templates/no-duplicate-pipelines.yml" # no stage
- "templates/docker-build.yml" # test and publish
- "templates/release-on-heptapod.yml" # release
- "templates/publish-pypi.yml" # release
stages:
- lint
- tests
- after-tests
- test
- release
- publish
- deploy
before_script:
- pip install tox
.test:
stage: test
before_script:
- pip install tox
check-manifest:
stage: tests
extends: .test
script: tox -e check-manifest
flake8:
stage: tests
extends: .test
rules:
- changes:
- "**/*.py"
script: tox -e flake8
py3:
stage: tests
extends: .test
script: tox -e py3
rules:
- changes:
- "**/*.py"
script: tox -e py3
artifacts:
paths:
- py3-deprecated-warnings.json
black:
stage: tests
stage: test
rules:
- changes:
- "**/*.py"
script: tox -e black
mypy:
stage: tests
stage: test
rules:
- changes:
- "**/*.py"
script: tox -e mypy
yamllint:
stage: lint
extends: .test
rules:
- changes:
- "**/*.yaml"
......@@ -54,3 +66,16 @@ yamllint:
- "*.yml"
script:
- tox -e yamllint
deploy:
image:
name: registry.logilab.fr/logilab/infra/dockerfiles/kubectl
stage: deploy
rules:
- if: '$CI_COMMIT_REF_NAME == "branch/default"'
script:
- kubectl version
- sed "s@r.intra.logilab.fr/intranet/intranet@$CI_REGISTRY_IMAGE:latest@" deploy/deployment.yaml | kubectl -n intranet apply -f -
- kubectl -n intranet rollout restart deployment/intranet deployment/crm-scheduler
- kubectl -n intranet rollout status --timeout=180s deployment/intranet
- kubectl -n intranet rollout status --timeout=180s deployment/intraet-scheduler
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment