-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
62 lines (59 loc) · 3.26 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
# Defines a variable to hold the version.
# Defaults to "v1" if not provided.
VERSION := $(if $(version),$(version),v1)
help:
@echo "Usage:"
@echo " make build version=<version> - to build the container with the specified version"
@echo " make test - to test the container"
@echo " make help - to display this help message"
build:
@echo "Building version $(VERSION)"
@docker build --pull \
-f ${VERSION}/Dockerfile \
--platform=linux/amd64 \
-t gcr.io/instruqt/cloud-client .
test: build
docker run -it --rm \
-e INSTRUQT_AWS_ACCOUNTS="AWS1,AWS2" \
-e INSTRUQT_AWS_ACCOUNT_AWS1_ACCOUNT_NAME="AWS 1" \
-e INSTRUQT_AWS_ACCOUNT_AWS1_ACCOUNT_ID="1234567890" \
-e INSTRUQT_AWS_ACCOUNT_AWS1_USERNAME="awsuser1" \
-e INSTRUQT_AWS_ACCOUNT_AWS1_PASSWORD="awspass1!@%^" \
-e INSTRUQT_AWS_ACCOUNT_AWS1_AWS_ACCESS_KEY_ID="access_key_1" \
-e INSTRUQT_AWS_ACCOUNT_AWS1_AWS_SECRET_ACCESS_KEY="secret_key_1" \
-e INSTRUQT_AWS_ACCOUNT_AWS2_ACCOUNT_NAME="AWS 2" \
-e INSTRUQT_AWS_ACCOUNT_AWS2_ACCOUNT_ID="0987654321" \
-e INSTRUQT_AWS_ACCOUNT_AWS2_USERNAME="awsuser2" \
-e INSTRUQT_AWS_ACCOUNT_AWS2_PASSWORD="awspass2^%@!" \
-e INSTRUQT_AWS_ACCOUNT_AWS2_AWS_ACCESS_KEY_ID="access_key_2" \
-e INSTRUQT_AWS_ACCOUNT_AWS2_AWS_SECRET_ACCESS_KEY="secret_key_2" \
-e INSTRUQT_GCP_PROJECTS="GCP1,GCP2" \
-e INSTRUQT_GCP_PROJECT_GCP1_PROJECT_NAME="GCP 1" \
-e INSTRUQT_GCP_PROJECT_GCP1_PROJECT_ID="instruqt-gcp1" \
-e INSTRUQT_GCP_PROJECT_GCP1_USER_EMAIL="user1@instruqt.io" \
-e INSTRUQT_GCP_PROJECT_GCP1_USER_PASSWORD="gcppass1!@%^" \
-e INSTRUQT_GCP_PROJECT_GCP1_SERVICE_ACCOUNT_EMAIL="sa-user1@instruqt.io" \
-e INSTRUQT_GCP_PROJECT_GCP1_SERVICE_ACCOUNT_KEY="sa-key1" \
-e INSTRUQT_GCP_PROJECT_GCP2_PROJECT_NAME="GCP 2" \
-e INSTRUQT_GCP_PROJECT_GCP2_PROJECT_ID="instruqt-gcp2" \
-e INSTRUQT_GCP_PROJECT_GCP2_USER_EMAIL="user2@instruqt.io" \
-e INSTRUQT_GCP_PROJECT_GCP2_USER_PASSWORD="gcppass2!@%^" \
-e INSTRUQT_GCP_PROJECT_GCP2_SERVICE_ACCOUNT_EMAIL="sa-user2@instruqt.io" \
-e INSTRUQT_GCP_PROJECT_GCP2_SERVICE_ACCOUNT_KEY="sa-key2" \
-e INSTRUQT_AZURE_SUBSCRIPTIONS="AZURE1,AZURE2" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE1_SUBSCRIPTION_NAME="Azure 1" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE1_SUBSCRIPTION_ID="11111111-0efd-40f8-ace9-e1616dfb69fa" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE1_USERNAME="azureuser1@instruqt.io" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE1_PASSWORD="azurepass1!@%^" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE1_SPN_ID="11111111-c88b-4941-b701-de16b795dded" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE1_SPN_PASSWORD="spnpass1!@%^" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE1_TENANT_ID="11111111-e1e2-4639-a706-6556470e4046" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE2_SUBSCRIPTION_NAME="Azure 2" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE2_SUBSCRIPTION_ID="22222222-0efd-40f8-ace9-e1616dfb69fa" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE2_USERNAME="azureuser2@instruqt.io" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE2_PASSWORD="azurepass2!@%^" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE2_SPN_ID="22222222-c88b-4941-b701-de16b795dded" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE2_SPN_PASSWORD="spnpass2!@%^" \
-e INSTRUQT_AZURE_SUBSCRIPTION_AZURE2_TENANT_ID="22222222-e1e2-4639-a706-6556470e4046" \
-p 8080:80 \
gcr.io/instruqt/cloud-client