Skip to content

Commit fcb4431

Browse files
authored
fix makefiles (#1831)
1 parent 254d8b7 commit fcb4431

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ include $(INCLUDE_BUILD_DIR)/ci.mk
3131
include $(INCLUDE_BUILD_DIR)/release.mk
3232

3333
# test
34+
include $(INCLUDE_TEST_DIR)/common.mk
3435
include $(INCLUDE_TEST_DIR)/test.mk
3536

3637
# tools
File renamed without changes.

test/canaries/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Include Ansible dependencies common installation strategy
2-
include ../ansible/Ansible.common
2+
include ../ansible/common.mk
33

44
ANSIBLE_FOLDER := $(CURDIR)
55
ANSIBLE_FORKS ?= 20

test/canaries/alerts/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Include AWS common features
2-
include ../../ansible/Ansible.common
2+
include ../../ansible/common.mk
3+
include ../../common.mk
34

45
PROVISION_ALERTS_TERRAFORM_WORKSPACE ?= $(CURDIR)
56

test/common.mk

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.PHONY: validate-aws-credentials
2+
validate-aws-credentials:
3+
@ACC_ID="$$(aws sts get-caller-identity --output text|awk '{print $$1}')"; \
4+
if [ "$${ACC_ID}" != "$(AWS_ACCOUNT_ID)" ]; then \
5+
echo "Invalid AWS account ID. Expected: $(AWS_ACCOUNT_ID), got: $${ACC_ID}."; \
6+
exit 1; \
7+
fi

test/provision/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Include Ansible dependencies common installation strategy
2-
include ../ansible/Ansible.common
2+
include ../ansible/common.mk
33

44
CROWDSTRIKE_REPO_SSH_KEY ?= $(HOME)/.ssh/crowdstrike_ansible_role_key
55
TERRAFORM_DIR := ./terraform

test/test.mk

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include $(CURDIR)/test/ansible/Ansible.common
1+
include $(CURDIR)/test/ansible/common.mk
22

33
PROVISION_HOST_PREFIX := $(shell whoami)-$(shell hostname)
44
AWS_ACCOUNT_ID = "018789649883"# CAOS
@@ -52,11 +52,3 @@ ifndef AGENT_VERSION
5252
else
5353
bash $(CURDIR)/test/packaging/docker.sh
5454
endif
55-
56-
.PHONY: validate-aws-credentials
57-
validate-aws-credentials:
58-
@ACC_ID="$$(aws sts get-caller-identity --output text|awk '{print $$1}')"; \
59-
if [ "$${ACC_ID}" != "$(AWS_ACCOUNT_ID)" ]; then \
60-
echo "Invalid AWS account ID. Expected: $(AWS_ACCOUNT_ID), got: $${ACC_ID}."; \
61-
exit 1; \
62-
fi

0 commit comments

Comments
 (0)