-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (40 loc) · 1.36 KB
/
Makefile
File metadata and controls
57 lines (40 loc) · 1.36 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
-include .env
# Repo version pins
.EXPORT_ALL_VARIABLES:
AIO_VERSION ?= 6.11.1
ALPINE_VERSION = 3.23
NGINX_VERSION = 1.28.3
GOMPLATE_VERISON = 3.11.7
COMMIT_SHA ?= git-$(shell git rev-parse --short HEAD)
NODE_DOCKER_IMAGE ?= node:test
IMAGE_NAME ?= node
IMAGE_TAG ?= $(shell git rev-parse --short HEAD)
IMAGE ?= $(NODE_DOCKER_IMAGE)
PUBLIC_REGISTRY ?= docker.io/wallarm/$(IMAGE_NAME)
DOCKERFILE ?= Dockerfile
SKIP_AIO_DOWNLOAD ?= false
BUILDX_ARGS = --push
ARCH ?= x86_64
DOCKER_ARCH ?= amd64
ifeq ($(ARCH),aarch64)
DOCKER_ARCH := arm64
endif
DOCKER_SCOUT_ARGS ?= ""
PYTEST_WORKERS ?= 10
PYTEST_PARAMS ?= --allure-features=Node
.PHONY: docker-image-build docker-scout-scan docker-push docker-sign smoke-test single split test-register-node-ci test-register-node-local
docker-image-build:
echo ${X_CI_BUILD_KIND}
build-scripts/docker_build.sh
@echo "IMAGE: ${IMAGE}"
docker-scout-scan:
docker-scout cves "${NODE_DOCKER_IMAGE}" $(DOCKER_SCOUT_ARGS)
docker-push:
docker buildx imagetools create -t ${PUBLIC_REGISTRY}:${IMAGE_TAG} ${NODE_DOCKER_IMAGE}
# Will be fixed after NODE-6066
if [ "$(X_CI_BUILD_KIND)" = "production" ] && ! echo "$(CI_COMMIT_TAG)" | grep -q '^sv-'; then \
docker buildx imagetools create -t ${PUBLIC_REGISTRY}:latest ${PUBLIC_REGISTRY}:${IMAGE_TAG}; \
fi
smoke-test: single split
single split:
test/smoke_test.sh $@