forked from yellowmegaman/container-trufflehog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
52 lines (48 loc) · 1.45 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
kind: pipeline
name: github
steps:
- name: check for accidentally dropped creds
image: yellowmegaman/container-trufflehog:2.0.98
commands:
- /usr/local/bin/trufflehog --regex --entropy=False file:///$CI_WORKSPACE
- name: dockerhost
image: alpine:3.8
environment:
DOCKER_REMOTE_HOST:
from_secret: docker_remote_host
DOCKER_REMOTE_PORT:
from_secret: docker_remote_port
DOCKER_REMOTE_USER:
from_secret: docker_remote_user
DOCKER_REMOTE_KEY:
from_secret: docker_remote_key
commands:
- apk add --no-cache openssh-client
- mkdir -p /root/.ssh
- echo -n "$${DOCKER_REMOTE_KEY}" | base64 -d &> /root/.ssh/id_rsa
- chmod 700 /root/.ssh
- chmod 600 /root/.ssh/id_rsa
- ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -N -L 0.0.0.0:2375:127.0.0.1:2375 $DOCKER_REMOTE_USER@$DOCKER_REMOTE_HOST -p $DOCKER_REMOTE_PORT
detach: true
- name: check-dockerhost
image: alpine:3.8
commands:
- sleep 1
- nc -zv dockerhost 2375
- name: pack
image: yellowmegaman/container-packer:1.3.3
environment:
DOCKER_HOST: tcp://dockerhost:2375
FROM_IMAGE: "python:3.7.1-alpine3.8"
TRUFFLEHOG_VER: "2.0.98"
PROJECT_NAME: yellowmegaman
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
QUAY_USERNAME:
from_secret: quay_username
QUAY_PASSWORD:
from_secret: quay_password
commands:
- packer build "$DRONE_REPO_NAME".json