Skip to content

Commit 425559f

Browse files
authored
Revert Makefile to fix lambda build & deploy workflows (#84)
* Clean up Makefile by removing unused targets Removed README_DEPS and lint target from Makefile. * Update dns_zone_id in fixtures.us-east-2.tfvars * Update expected domainHostname in test * Update expected output for kibanaHostname test
1 parent d4124b0 commit 425559f

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
SHELL := /bin/bash
2+
LAMBDA_DIR := lambda
3+
DEPS_CONTAINER := alpine:3.11
4+
5+
-include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness)
6+
7+
readme/build:
8+
@atmos docs generate readme
9+
10+
readme:
11+
@atmos docs generate readme
12+
13+
define docker
14+
docker run -i -v $(PWD)/$(LAMBDA_DIR)/:/code -w /code $(DEPS_CONTAINER) /bin/sh -c '$(1)'
15+
endef
16+
17+
## Install dependencies
18+
dependencies:
19+
@echo "==> Installing Lambda function dependencies..."
20+
@$(call docker, apk add --update py-pip && \
21+
pip install virtualenv && \
22+
virtualenv venv --always-copy && \
23+
source ./venv/bin/activate && \
24+
./venv/bin/pip install -qUr requirements.txt)
25+
26+
## Build Lambda function zip
27+
build: dependencies
28+
@echo "==> Building Lambda function zip..."
29+
@mkdir -p artifacts
30+
@cd $(LAMBDA_DIR) && zip -r ../artifacts/lambda.zip *
31+
@ls -l artifacts/lambda.zip

examples/complete/fixtures.us-east-2.tfvars

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ebs_volume_size = 10
2424

2525
create_iam_service_linked_role = false
2626

27-
dns_zone_id = "Z3SO0TKDDQ0RGG"
27+
dns_zone_id = "Z0880904EUMUUAAGCA17"
2828

2929
schedule = "rate(5 minutes)"
3030

test/src/examples_complete_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ func TestExamplesComplete(t *testing.T) {
6060
// Run `terraform output` to get the value of an output variable
6161
domainHostname := terraform.Output(t, terraformOptions, "domain_hostname")
6262
// Verify we're getting back the outputs we expect
63-
assert.Equal(t, "eg-test-es-cleanup-"+randId+".testing.cloudposse.co", domainHostname)
63+
assert.Equal(t, "eg-test-es-cleanup-"+randId+".modules.cptest.test-automation.app", domainHostname)
6464

6565
// Run `terraform output` to get the value of an output variable
6666
kibanaHostname := terraform.Output(t, terraformOptions, "kibana_hostname")
6767
// Verify we're getting back the outputs we expect
68-
assert.Equal(t, kibanaSubdomain+".testing.cloudposse.co", kibanaHostname)
68+
assert.Equal(t, kibanaSubdomain+".modules.cptest.test-automation.app", kibanaHostname)
6969

7070
// Run `terraform output` to get the value of an output variable
7171
domainEndpoint := terraform.Output(t, terraformOptions, "domain_endpoint")

0 commit comments

Comments
 (0)