-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
40 lines (35 loc) · 967 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
include:
- project: 'docker/process-webhooks'
file: '/gitlab/deploy.yml'
variables:
GIT_SUBMODULE_STRATEGY: recursive
PROJECT_TO_BE_DEPLOYED: 'docker/conjugador'
stages:
- test
- build
- deploy
test:
image: python:3.11.0-slim-bullseye
before_script:
- apt-get update && apt-get install make
- pip install nose2
stage: test
script:
- pip install -r requirements.txt
- make test
build:
image: docker:latest
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker info
stage: build
script:
- docker build -f docker/dockerfile --cache-from $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
deploy:
stage: deploy
extends:
.default-deploy