Skip to content

Commit

Permalink
ci: Use buildx for docker builds when changes merged into master (#2703)
Browse files Browse the repository at this point in the history
* ci: Use buildx for docker builds when changes merged into master

Signed-off-by: Achal Shah <[email protected]>

* use --load to load the built image into docker

Signed-off-by: Achal Shah <[email protected]>

* buildx build smh

Signed-off-by: Achal Shah <[email protected]>
  • Loading branch information
achals authored May 16, 2022
1 parent 1958df0 commit 2d56963
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/master_only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Set up AWS SDK
uses: aws-actions/configure-aws-credentials@v1
with:
Expand Down Expand Up @@ -50,6 +52,7 @@ jobs:
docker build \
--file sdk/python/feast/infra/feature_servers/aws_lambda/Dockerfile \
--tag $ECR_REGISTRY/$ECR_REPOSITORY:${{ steps.image-tag.outputs.DOCKER_IMAGE_TAG }} \
--load \
.
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ steps.image-tag.outputs.DOCKER_IMAGE_TAG }}
outputs:
Expand Down Expand Up @@ -177,7 +180,9 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Login to DockerHub
uses: docker/login-action@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
docker build \
--file sdk/python/feast/infra/feature_servers/aws_lambda/Dockerfile \
--tag $ECR_REGISTRY/$ECR_REPOSITORY:${{ steps.image-tag.outputs.DOCKER_IMAGE_TAG }} \
--load \
.
docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ steps.image-tag.outputs.DOCKER_IMAGE_TAG }}
outputs:
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,17 @@ push-feature-server-python-aws-docker:
docker push $(REGISTRY)/feature-server-python-aws:$$VERSION

build-feature-server-python-aws-docker:
docker buildx --build-arg VERSION=$$VERSION \
docker buildx build --build-arg VERSION=$$VERSION \
-t $(REGISTRY)/feature-server-python-aws:$$VERSION \
-f sdk/python/feast/infra/feature_servers/aws_lambda/Dockerfile .
-f sdk/python/feast/infra/feature_servers/aws_lambda/Dockerfile --load .

push-feature-transformation-server-docker:
docker push $(REGISTRY)/feature-transformation-server:$(VERSION)

build-feature-transformation-server-docker:
docker build --build-arg VERSION=$(VERSION) \
docker buildx build --build-arg VERSION=$(VERSION) \
-t $(REGISTRY)/feature-transformation-server:$(VERSION) \
-f sdk/python/feast/infra/transformation_servers/Dockerfile .
-f sdk/python/feast/infra/transformation_servers/Dockerfile --load .

push-feature-server-java-docker:
docker push $(REGISTRY)/feature-server-java:$(VERSION)
Expand Down

0 comments on commit 2d56963

Please sign in to comment.