-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
47 lines (42 loc) · 1.12 KB
/
.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
41
42
43
44
45
46
.python_venv:
image: python:3
before_script:
- python3 -m venv .venv
- source .venv/bin/activate
- python -V
- pip install -r requirements.txt
test_generation:
stage: test
extends: .python_venv
script:
- cd proto
- python tests.py
test_interaction:
rules:
- if: $NO_GHDL == null
stage: test
extends: .python_venv
script:
- cd testfiles/tb
- ./run.sh
deploy:
stage: deploy
only:
- master
- tags
tags:
- cheby-cd
script:
- source integration/cern-ci.sh
docker-publish:
stage: deploy
only:
- master
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
# for tagged versions: use the tag as the image name, for master: use latest
- export IMAGE_NAME=$(if [ -z "$CI_COMMIT_TAG" ]; then echo "latest"; else echo "$CI_COMMIT_TAG"; fi)
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$IMAGE_NAME