-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (18 loc) · 859 Bytes
/
Makefile
File metadata and controls
24 lines (18 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Set the version as an environment variable
VERSION ?= 1-25-0
# Set the URL command
URL_CMD=$(shell aws lambda get-layer-version-by-arn --arn arn:aws:lambda:us-east-1:901920570463:layer:aws-otel-python-amd64-ver-${VERSION}:1 --query Content.Location --output text)
# Define a target to download the ZIP file
download:
curl "${URL_CMD}" -o aws-otel-python-amd64-ver-${VERSION}.zip
# Define a target to build the Docker image
build: download
docker build --platform linux/amd64 --build-arg OTEL_VERSION=$(VERSION) -t nvsec/aws-otel-python:$(VERSION) .
# Define a target to remove the ZIP file
clean:
rm -f aws-otel-python-amd64-ver-$(VERSION).zip
# Define a target to push the Docker image
push: build clean
docker push nvsec/aws-otel-python:$(VERSION)
# Define a default target to perform the entire process (download, build, clean, push)
all: push