Skip to content

Commit 4cd1ff6

Browse files
authored
Merge pull request #8 from newrelic/cn/multi-platform-build
Add multi-platform build/push
2 parents 755dc07 + 9fdc1e2 commit 4cd1ff6

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
image_name=newrelic/fastly-to-insights
22

3+
require_tag:
4+
@if [ -z "$(tag)" ]; then echo "tag must be set" && exit 1; fi
5+
@if [ "$(tag)" != "$(shell git describe --tags --exact-match)" ]; then echo "please checkout requested tag: $(tag)" && exit 1; fi
6+
7+
release: require_tag
8+
docker buildx build --platform linux/amd64,linux/arm64 --push -t $(image_name):$(tag) .
9+
310
build:
4-
docker build -t $(image_name) .
11+
docker buildx build --platform linux/amd64,linux/arm64 -t $(image_name) .
512

613
run: build
714
docker run --rm --env-file .env --name fastly-to-insights $(image_name)

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ You are welcome to send pull requests to us - however, by doing so you agree tha
4646

4747
A Makefile is provided which you can use to build and run the fastly to insights integration locally -- `make run` will build and then run the image. You can provide configuration via a `.env` file (`.env.example` provided as an example).
4848

49+
## Releasing
50+
51+
To release a new image, make sure you've created a tag for your release, check it out and then run `make release tag=<your-tag>`. This will build the Docker image and push it to DockerHub.
52+
4953
## More Information
5054

5155
For more information on the Fastly Real-Time Analytics API, look [here](https://docs.fastly.com/api/analytics).

0 commit comments

Comments
 (0)