forked from FORTH-ICS-INSPIRE/artemis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
121 lines (121 loc) · 5.49 KB
/
.travis.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
language: python
sudo: required
services:
- docker
env:
global:
- DOCKER_TAG=$(if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST_BRANCH"
== "" ]; then echo "latest"; else echo dev-PR${TRAVIS_PULL_REQUEST}; fi)
branches:
only:
- master
jobs:
include:
- stage: check
install:
- python -m pip install pre-commit
- pre-commit install
script:
- pre-commit run --all-files
- stage: build and push docker
name: backend
install: []
before_script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
script:
- docker build -t inspiregroup/artemis-backend:${DOCKER_TAG} backend/
- docker push inspiregroup/artemis-backend:${DOCKER_TAG}
- name: frontend
install: []
before_script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
script:
- docker build -t inspiregroup/artemis-frontend:${DOCKER_TAG} frontend/
- docker push inspiregroup/artemis-frontend:${DOCKER_TAG}
- name: monitor
install: []
before_script:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
script:
- docker build -t inspiregroup/artemis-monitor:${DOCKER_TAG} monitor/
- docker push inspiregroup/artemis-monitor:${DOCKER_TAG}
- stage: run
name: TestCafe
install: []
before_script:
- docker pull inspiregroup/artemis-backend:${DOCKER_TAG}
- docker pull inspiregroup/artemis-frontend:${DOCKER_TAG}
- docker pull inspiregroup/artemis-monitor:${DOCKER_TAG}
- docker tag inspiregroup/artemis-backend:${DOCKER_TAG} artemis_backend:latest
- docker tag inspiregroup/artemis-frontend:${DOCKER_TAG} artemis_frontend:latest
- docker tag inspiregroup/artemis-monitor:${DOCKER_TAG} artemis_monitor:latest
script:
- docker-compose -f docker-compose.testcafe.yaml up --abort-on-container-exit
after_failure:
- docker-compose -f docker-compose.testcafe.yaml logs
- name: TestDetection
install:
- pip install codecov
before_script:
- docker pull inspiregroup/artemis-backend:${DOCKER_TAG}
- docker tag inspiregroup/artemis-backend:${DOCKER_TAG} artemis_backend:latest
- docker build -t artemis_detection_testing tester/detection
- docker-compose -f docker-compose.testdetection.yaml up -d
script:
- docker run --rm -ti --env-file .env --network artemis_artemis artemis_detection_testing
after_success:
- sh convert_coverage.sh
- codecov
after_failure:
- docker-compose -f docker-compose.testdetection.yaml logs
- name: TestAutoconf
install:
- pip install codecov
before_script:
- docker pull inspiregroup/artemis-backend:${DOCKER_TAG}
- docker tag inspiregroup/artemis-backend:${DOCKER_TAG} artemis_backend:latest
- docker build -t artemis_autoconf_testing tester/autoconf
- docker-compose -f docker-compose.testautoconf.yaml up -d
script:
- docker run --rm -ti --env-file .env --network artemis_artemis artemis_autoconf_testing
after_success:
- sh convert_coverage.sh
- codecov
after_failure:
- docker-compose -f docker-compose.testautoconf.yaml logs
- name: Benchmark
if: type == pull_request
install: []
before_script:
- docker pull inspiregroup/artemis-backend:${DOCKER_TAG}
- docker tag inspiregroup/artemis-backend:${DOCKER_TAG} artemis_backend:latest
- docker build -t artemis_benchmark benchmark
- docker-compose -f docker-compose.benchmark.yaml up -d
script:
- docker run --rm -ti --env-file .env -e "REPO_SLUG=${TRAVIS_REPO_SLUG}" -e "GITHUB_TOKEN=${GITHUB_TOKEN}"
-e "PULL_REQUEST_NUMBER=${TRAVIS_PULL_REQUEST}" --network artemis_artemis artemis_benchmark
- name: TestRPKI
install:
- pip install codecov
before_script:
- docker pull inspiregroup/artemis-backend:${DOCKER_TAG}
- docker tag inspiregroup/artemis-backend:${DOCKER_TAG} artemis_backend:latest
- mkdir -p local_configs/routinator/tals
- sudo chown -R 1012:1012 local_configs/routinator/tals
- mkdir -p local_configs/routinator/rpki-repo
- sudo chown -R 1012:1012 local_configs/routinator/rpki-repo
- cp other/routinator/routinator.conf local_configs/routinator/routinator.conf
- sudo chown -R 1012:1012 local_configs/routinator/routinator.conf
- docker build -t artemis_rpki_testing tester/rpki
- docker run --rm -v $(pwd)/local_configs/routinator/tals:/home/routinator/.rpki-cache/tals nlnetlabs/routinator init -f --accept-arin-rpa
- docker-compose -f docker-compose.testrpki.yaml -f docker-compose.routinator.yaml up -d
script:
- docker run --rm -ti --env-file .env --network artemis_artemis artemis_rpki_testing
after_success:
- sh convert_coverage.sh
- codecov
after_failure:
- docker-compose -f docker-compose.testrpki.yaml logs
notifications:
slack:
secure: es0zP6IAgEJbdvJz8apGlQAO0SOnMMuQwTbItiXTUjA60Tfn2gcB7vk8n60Y/pEsLn9Z9Kk9WJp7/S9jZiKITpzLxSabo0+PF+DangvNUZMmJ9NV7oJOxGVQS94Ape2pHs6x4SUpP6JkadIU5ZxXbjVr8ZIPL2VfdclPlMBsM/K3ZNgd5cPLnPKsPuKn9WtTFDm/oGaWh/V6Y9T7/l/kNZrj6K7IcrI2rv4+LKLZDNicaQIN59M4Qt4niaETYNqZuqtWewHZH+KlXKzukFZ92qUDEG/3TBvqQDqimbjAXZkltso1MXBnSblrKNb1b00WysGwhT89zPeovhjcrHZB9vH9mKGNp5qoiBjVGzKYHLptitNqupP2ReUaRqKonRAw43iAN+8SSfrmCtyQGDv60fWLheUw+fbK8IRMrAYIG9t20/upDbrPTxU741Cqzgfy5fygnAuqmRi5AkckymJte5bf/SwQsmf5IFpc6FP6fcGZT6yL1zf55tsi8pXpq80SLokcH2bO17wEHSJxuNPOxNgJQjugY/VX58owZgHgYn1sLGpxrKlAwuQgs1+Av16TRGhCjyQPgWRN9inva/AwNEtA+ljp4PqzTk7oBI9MLaX3osU8Rm6bfMI2KNwcWpfcbztkYwZQLR4v45M91QnAE9UCbbkg4epgTli2RKnHCyQ=