-
Notifications
You must be signed in to change notification settings - Fork 15
/
.gitlab-ci.yml
62 lines (55 loc) · 1.54 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
image: docker:26.1.1
services:
- docker:26.1.1-dind
stages:
- build_container
- test
# - release
# - deploy
variables:
# Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
GIT_SUBMODULE_STRATEGY: recursive
build_container:
stage: build_container
only:
changes:
- docker/Dockerfile
- pyproject.toml
- third_party
- .gitlab-ci.yml
- .gitmodules
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -t $CONTAINER_TEST_IMAGE -f docker/Dockerfile .
- docker push $CONTAINER_TEST_IMAGE
test_closed_loop:
stage: test
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker pull $CONTAINER_TEST_IMAGE
- docker run -v /builds/neu-autonomy/certifiable-learning/nfl_veripy:/home/nfl_veripy $CONTAINER_TEST_IMAGE python tests/test.py
# release-image:
# stage: release
# script:
# - docker pull $CONTAINER_TEST_IMAGE
# - docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE
# - docker push $CONTAINER_RELEASE_IMAGE
# only:
# changes:
# - docker/Dockerfile
# - nfl_veripy/setup.py
# - nn_partition/setup.py
# refs:
# - merge_requests
# # only:
# # - master
# deploy:
# stage: deploy
# script:
# - ./deploy.sh
# only:
# - master