Skip to content

Commit 34bf813

Browse files
author
eloy.moreno
committed
added exec test with docker build
1 parent 5865fed commit 34bf813

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed

resources/Dockerfile_2

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright 2021 Adevinta
2+
3+
FROM docker:20.10-git
4+
5+
WORKDIR /app
6+
7+
COPY vulcan-local .
8+
9+
ENTRYPOINT [ "/app/vulcan-local" ]

script/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ echo "Test local docker image"
2424
./vulcan-local -t path/vulcan-local:xxx -a DockerImage -i trivy
2525
echo "exit=$?"
2626

27+
# Add a path and a tag to bypass check target validations.
28+
docker tag vulcan-local path/vulcan-local:xxx
29+
echo "Test local docker image"
30+
./vulcan-local -t Dockerfile -a DockerImage -i trivy
31+
echo "exit=$?"
32+
2733
echo "Docker test based on yaml config"
2834
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
2935
-v "$PWD":/target -e TRAVIS_BUILD_DIR=/target \

vulcan_bis.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
conf:
2+
# Variables needed by some checks.
3+
vars:
4+
# Credentials for cloning private repositories
5+
GITHUB_ENTERPRISE_ENDPOINT: ${GITHUB_ENTERPRISE_ENDPOINT}
6+
GITHUB_ENTERPRISE_TOKEN: ${GITHUB_ENTERPRISE_TOKEN}
7+
8+
# Credentials to pass to the checks to pull private images
9+
REGISTRY_DOMAIN: ${REGISTRY_SERVER}
10+
REGISTRY_USERNAME: ${REGISTRY_USERNAME}
11+
REGISTRY_PASSWORD: ${REGISTRY_PASSWORD}
12+
13+
# Registry credentials to pull checks from private registries
14+
registries:
15+
- server: ${REGISTRY_SERVER}
16+
username: ${REGISTRY_USERNAME}
17+
password: ${REGISTRY_PASSWORD}
18+
19+
# *Always*, Never, IfNotPresent
20+
pullPolicy: IfNotPresent
21+
22+
# Number of checks to run concurrently
23+
concurrency: 5
24+
25+
targets:
26+
27+
- target: ${DOCKER_IMAGE:-Dockerfile}
28+
assetType: DockerImage
29+
30+
- target: ${DOCKER_IMAGE:-resources/Dockerfile_2}
31+
assetType: DockerImage

0 commit comments

Comments
 (0)