-
Notifications
You must be signed in to change notification settings - Fork 1
/
container-trufflehog.json
91 lines (90 loc) · 2.34 KB
/
container-trufflehog.json
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
{
"variables": {
"app": "{{env `DRONE_REPO_NAME`}}",
"from_image": "{{env `FROM_IMAGE`}}",
"trufflehog_ver": "{{env `TRUFFLEHOG_VER`}}",
"project_name": "{{env `PROJECT_NAME`}}",
"docker_username": "{{env `DOCKER_USERNAME`}}",
"docker_password": "{{env `DOCKER_PASSWORD`}}",
"quay_username": "{{env `QUAY_USERNAME`}}",
"quay_password": "{{env `QUAY_PASSWORD`}}",
"tag": "{{env `TRUFFLEHOG_VER`}}"
},
"builders":[
{
"type": "docker",
"commit": true,
"image": "{{user `from_image`}}",
"run_command": ["-dit", "--net=host", "{{.Image}}", "/bin/ash"],
"changes": [
"ENTRYPOINT [\"/usr/local/bin/trufflehog\"]"
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"apk add --no-cache git",
"pip install trufflehog==2.0.98",
"trufflehog -h"
]
}
],
"post-processors": [
[
{
"type": "docker-tag",
"repository": "docker.io/{{user `project_name`}}/{{user `app`}}",
"tag": "{{user `tag`}}"
},
{
"type": "docker-push",
"login": true,
"login_username": "{{user `docker_username`}}",
"login_password": "{{user `docker_password`}}"
}
],
[
{
"type": "docker-tag",
"repository": "docker.io/{{user `project_name`}}/{{user `app`}}",
"tag": "latest"
},
{
"type": "docker-push",
"login": true,
"login_username": "{{user `docker_username`}}",
"login_password": "{{user `docker_password`}}"
}
],
[
{
"type": "docker-tag",
"repository": "quay.io/{{user `project_name`}}/{{user `app`}}",
"tag": "{{user `tag`}}"
},
{
"type": "docker-push",
"login": true,
"login_server": "quay.io",
"login_username": "{{user `quay_username`}}",
"login_password": "{{user `quay_password`}}"
}
],
[
{
"type": "docker-tag",
"repository": "quay.io/{{user `project_name`}}/{{user `app`}}",
"tag": "latest"
},
{
"type": "docker-push",
"login": true,
"login_server": "quay.io",
"login_username": "{{user `quay_username`}}",
"login_password": "{{user `quay_password`}}"
}
]
]
}