-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.hcl
52 lines (49 loc) · 1.48 KB
/
example.hcl
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
settings {
pathto = "/code"
localweb = "http://{IP}:80/files"
localpath = "/var/www/html/files/"
localinterface = "eth0"
gitlabpath = "https://gitlab.com/hyperbadger/ci/library/-/archive/{VERSION}/library-{VERSION}.zip"
githubpath = "https://github.com/hyperbadger/ci/library/archive/refs/heads/{VERSION}.zip"
default_container = "somecontainerwithpython:latest"
environment "local" {
region = "global"
priority = "50"
datacenter = "dc1"
}
environment "remote" {
region = "global"
priority = "50"
datacenter = "dc1"
}
}
stage "test" "formatting" {
include = "formatting.hcl"
}
stage "test" "testing" {
step "unittest" {
driver "docker" {
container = "safesecurity/pytest:latest"
}
command = ["pip3 install -r requirements.txt",
"pytest tests"]
environments = ["local"]
pathto = "/local/usr/src/"
workdir = "/local/usr/src/index-api/"
}
step "functest" {
driver "docker" {
container = "safesecurity/pytest:latest"
}
command = ["ls -la",
"pip3 install -r requirements.txt",
"pytest tests"]
deployment = "functest_deployment"
environments = ["remote"]
pathto = "/local/usr/src/"
workdir = "/local/usr/src/index-api/"
}
}
deployment "functest_deployment" {
pack = "somepack.nomad"
}