-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (50 loc) · 1.27 KB
/
Makefile
File metadata and controls
58 lines (50 loc) · 1.27 KB
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
DOCKER ?= docker
PWD ?= pwd
NPM ?= npm
SAMPLE_JSON ?= sample.json
.PHONY: clean
clean:
rm -rf sbom_output
rm -rf output
rm -rf build
rm -rf node_modules
rm package.json package-lock.json || echo "not found"
.PHONY: docker
docker:
$(DOCKER) build --build-arg ARCH=arm64 --tag syft-bitbucket-pipe:dev .
.PHONY: docker-amd64
docker-amd64:
$(DOCKER) buildx build --platform linux/amd64 --build-arg ARCH=amd64 --tag syft-bitbucket-pipe:dev .
.PHONY: docker-lint
docker-lint:
$(DOCKER) run --rm -it \
-v "$(shell pwd)":/build \
--workdir /build \
hadolint/hadolint:v2.14.0-alpine hadolint Dockerfile*
.PHONY: shellcheck
shellcheck:
$(DOCKER) run --rm -it \
-v $(PWD):/build \
--workdir /build \
koalaman/shellcheck-alpine:v0.11.0 shellcheck -x ./*.sh
.PHONY: markdown-lint
markdown-lint:
$(DOCKER) run --rm -it \
-v "$(shell pwd)":/build \
--workdir /build \
markdownlint/markdownlint:0.15.0 *.md
.PHONY: docker-debug
docker-debug:
$(DOCKER) run --rm -it \
--volume $(PWD)/samples:/tmp/samples \
--workdir /tmp \
--entrypoint ash \
--env-file variables.list \
syft-bitbucket-pipe:dev
.PHONY: scan-project
scan-project:
$(DOCKER) run --rm -it \
-v $(PWD)/samples:/tmp/samples \
--workdir /tmp \
--env-file variables.list \
syft-bitbucket-pipe:dev