-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.drone.yml
53 lines (49 loc) · 1.58 KB
/
.drone.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
pipeline:
# build our test image and deploy it for testing
unittests:
image: kubam/python-test
# environment:
# - https_proxy=proxy.esl.cisco.com:80
# - http_proxy=proxy.esl.cisco.com:80
# - noproxy=10.93.234.238
commands:
- echo "Building.."
- mkdir -p /kubam
- cd kubam/app
- python -m unittest test.test_db.DBUnitTests
- python -m unittest test.test_app.FlaskTestCase
- python -m unittest test.test_sg.SGUnitTests
- python -m unittest test.test_autoinstall.AutoInstallUnitTests
- python -m unittest test.test_ucsc.UCSCUnitTests
- python -m unittest test.test_monitor.MonitorUnitTests
# publish docker image to docker hub
docker:
image: plugins/docker
repo: kubam/kubam
tags: v2
user: kubam
secrets: [docker_username, docker_password]
#when:
# branch: v2.0
# bring up our test machine so it has the latest API.
ssh:
image: appleboy/drone-ssh
host: 10.93.140.118
username: root
port: 22
password: Cisco.123
#secrets: [ ssh_password ]
script:
- docker rm -f kubam || true
- docker pull kubam/kubam:v2
- sudo docker run -p 80:80 -d -v /root/kubam:/kubam:Z --device /dev/fuse --cap-add SYS_ADMIN --privileged --name kubam kubam/kubam:v2
# use Cisco Spark to notify that build was successful.
notify:
image: vallard/drone-spark
room: "KUBAM Feedback"
environment:
- https_proxy=proxy.esl.cisco.com:80
- http_proxy=proxy.esl.cisco.com:80
secrets: [ SPARK_TOKEN ]
when:
status: [success, failure]