-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
86 lines (74 loc) · 3.39 KB
/
Makefile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
GOCMD=go
GOBUILD=$(GOCMD) build $(GOARGS)
GOTEST=$(GOCMD) test $(GOARGS)
MAKEFILE_PATH=$(abspath $(lastword $(MAKEFILE_LIST)))
MAKEFILE_DIR=$(dir $(MAKEFILE_PATH))
OUTPUT_DIR=build
BINARY_NAME=terraform-provider-luminate
GO111MODULE=on
all: linux darwin windows darwin_arm64
linux:
mkdir -p release || true
export GOOS=linux; export CGO_ENABLED=0; $(GOBUILD) -o $(OUTPUT_DIR)/linux/$(BINARY_NAME) -v
zip -j release/$(BINARY_NAME)-linux.zip $(OUTPUT_DIR)/linux/*
darwin:
mkdir -p release || true
export GOOS=darwin; $(GOBUILD) -o $(OUTPUT_DIR)/darwin/$(BINARY_NAME) -v
zip -j release/$(BINARY_NAME)-darwin.zip $(OUTPUT_DIR)/darwin/*
windows:
mkdir -p release || true
export GOOS=windows; $(GOBUILD) -o $(OUTPUT_DIR)/windows/$(BINARY_NAME) -v
zip -j release/$(BINARY_NAME)-windows.zip $(OUTPUT_DIR)/windows/*
testacc:
export LUMINATE_API_ENDPOINT="${TERRAFORM_ACCEPTANCE_TENANT}" && \
export LUMINATE_API_CLIENT_ID="${TERRAFORM_ACCEPTANCE_CLIENT_ID}" && \
export LUMINATE_API_CLIENT_SECRET="${TERRAFORM_ACCEPTANCE_CLIENT_SECRET}" && \
export TF_ACC=1 && \
export TF_LOG="ERROR" && \
export TEST_GROUP_NAME="tf-acceptance" && \
export TEST_AWS_ACCOUNT_ID="957040371666" && \
export TEST_AWS_INTEGRATION_NAME="terraform-test" && \
export TEST_SSH_CLIENT_NAME="tf-at-ssh-client" && \
export TEST_SSH_CLIENT_DESCRIPTION="a good description" && \
export TEST_USERNAME="[email protected]" && \
export TEST_USER_ID="f75f45b8-d10d-4aa6-9200-5c6d60110430" && \
export TEST_USER_ID2="ed974d59-1941-4584-9336-2a9ed35043f2" && \
export TEST_SITE_REGION="us-west1" && \
export TEST_IDP_ID="0a0524a3-44ae-43b2-9d79-6cb018136b6e" && \
$(GOTEST) -p 1 -v ./...
testacc_serial:
export LUMINATE_API_ENDPOINT="${LUMINATE_API_ENDPOINT}" && \
export LUMINATE_API_CLIENT_ID="${LUMINATE_API_CLIENT_ID}" && \
export LUMINATE_API_CLIENT_SECRET="${LUMINATE_API_CLIENT_SECRET}" && \
export TF_ACC=1 && \
export TF_LOG=ERROR && \
export TEST_AWS_ACCOUNT_ID="${TEST_AWS_ACCOUNT_ID}" && \
export TEST_AWS_INTEGRATION_NAME="${TEST_AWS_INTEGRATION_NAME}" && \
$(GOTEST) -p 1 -v ./provider/serial_tests
testacc_no_serial:
export LUMINATE_API_ENDPOINT="${LUMINATE_API_ENDPOINT}" && \
export LUMINATE_API_CLIENT_ID="${LUMINATE_API_CLIENT_ID}" && \
export LUMINATE_API_CLIENT_SECRET="${LUMINATE_API_CLIENT_SECRET}" && \
export TF_ACC=1 && \
export TF_LOG=ERROR && \
export TEST_GROUP_NAME="${TEST_GROUP_NAME}" && \
export TEST_SSH_CLIENT_NAME="${TEST_SSH_CLIENT_NAME}" && \
export TEST_SSH_CLIENT_DESCRIPTION="${TEST_SSH_CLIENT_DESCRIPTION}" && \
export TEST_USERNAME="${TEST_USERNAME}" && \
export TEST_USER_ID="${TEST_USER_ID}" && \
export TEST_USER_ID2="${TEST_USER_ID2}" && \
export TEST_SITE_REGION="${TEST_SITE_REGION}" && \
export TEST_IDP_ID="${TEST_IDP_ID}" && \
go_list_results=$$(go list ./... | grep -v 'serial_tests\|wss_tests') && $(GOTEST) -p 1 -v $$go_list_results
testacc_wss:
export LUMINATE_API_ENDPOINT="${LUMINATE_API_ENDPOINT}" && \
export LUMINATE_API_CLIENT_ID="${LUMINATE_API_CLIENT_ID}" && \
export LUMINATE_API_CLIENT_SECRET="${LUMINATE_API_CLIENT_SECRET}" && \
export TF_ACC=1 && \
export TF_LOG=ERROR && \
export RUN_WSS_TESTS=true && \
$(GOTEST) -p 1 -v ./provider/wss_tests
darwin_arm64:
mkdir -p release || true
export GOOS=darwin GOARCH=arm64; $(GOBUILD) -o $(OUTPUT_DIR)/darwin_arm64/$(BINARY_NAME) -v
zip -j release/$(BINARY_NAME)-darwin_arm64.zip $(OUTPUT_DIR)/darwin_arm64/*