aboutsummaryrefslogtreecommitdiffstats
path: root/test/security/sslendpoints/Makefile
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-02-25 13:36:59 +0100
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-03-25 13:08:24 +0000
commit600bce340bda372151b4120d89c854f2decc3a93 (patch)
tree32b37ae282f41729665661c9eb29237e0d5e4610 /test/security/sslendpoints/Makefile
parent45d5c7a8853f5b25dbb9b6b8a99846d68a199468 (diff)
Add NodePorts filtering with development environment basis
This patch has not made "sslendpoints" fully compatible with "check_for_nonssl_endpoints.sh" script yet. It sets up basic development environment for Golang-based checkers, though. Tool output will be added to the README after reaching full compatibility with previous (script) version. Development environment brought by this patch is heavily based on: https://github.com/SamsungSLAV/boruta Issue-ID: SECCOM-261 Change-Id: I8f035b63bea13785c40971ede5fdbbc9b6810168 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security/sslendpoints/Makefile')
-rw-r--r--test/security/sslendpoints/Makefile39
1 files changed, 39 insertions, 0 deletions
diff --git a/test/security/sslendpoints/Makefile b/test/security/sslendpoints/Makefile
new file mode 100644
index 000000000..2d6308826
--- /dev/null
+++ b/test/security/sslendpoints/Makefile
@@ -0,0 +1,39 @@
+BUILD_DIR = bin
+BUILD_DOCKER_IMAGE = sslendpoints-build-img
+BUILD_DOCKER_CONTAINER = sslendpoints-build
+BINARIES = sslendpoints
+BINARIES := $(addprefix ${BUILD_DIR}/, ${BINARIES})
+
+.PHONY: all
+all: docker-build
+
+.PHONY: clean
+clean: clean-docker-build clean-build
+
+.PHONY: docker-build
+docker-build: ${BINARIES}
+ docker rm "${BUILD_DOCKER_CONTAINER}"
+
+${BINARIES}: docker-container | ${BUILD_DIR}
+ docker cp "${BUILD_DOCKER_CONTAINER}:/$@" $@
+
+.PHONY: docker-container
+docker-container: docker-build-img
+ docker create --name "${BUILD_DOCKER_CONTAINER}" "${BUILD_DOCKER_IMAGE}"
+
+.PHONY: docker-build-img
+docker-build-img:
+ docker build --tag "${BUILD_DOCKER_IMAGE}" .
+
+${BUILD_DIR}:
+ mkdir -p "${BUILD_DIR}"
+
+.PHONY: clean-docker-build
+clean-docker-build:
+ -docker rm "${BUILD_DOCKER_CONTAINER}"
+ -docker rmi "${BUILD_DOCKER_IMAGE}"
+
+.PHONY: clean-build
+clean-build:
+ -rm -f ${BINARIES}
+ -rmdir ${BUILD_DIR}