Skip to content

Commit 5cba559

Browse files
Anarion-zuontkathole
authored andcommitted
master_only docker build use make
Signed-off-by: aaronzuo <anarionzuo@outlook.com>
1 parent 82a7265 commit 5cba559

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

.github/workflows/master_only.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
pull_request:
8-
branches:
9-
- master
107

118
jobs:
129
integration-test-python:
@@ -92,7 +89,19 @@ jobs:
9289
runs-on: ubuntu-latest
9390
strategy:
9491
matrix:
95-
component: [ feature-server-dev, feature-transformation-server, feast-operator ]
92+
include:
93+
- component: feature-server-dev
94+
target: feature-server-dev
95+
build_args: DOCKER_PUSH=true DOCKER_PLATFORMS=linux/amd64,linux/arm64
96+
push_mode: imagetools
97+
- component: feature-transformation-server
98+
target: feature-transformation-server
99+
build_args: ""
100+
push_mode: all_tags
101+
- component: feast-operator
102+
target: feast-operator
103+
build_args: ""
104+
push_mode: all_tags
96105
env:
97106
REGISTRY: quay.io/feastdev-ci
98107
steps:
@@ -120,22 +129,11 @@ jobs:
120129
username: ${{ secrets.QUAYIO_CI_USERNAME }}
121130
password: ${{ secrets.QUAYIO_CI_TOKEN }}
122131
- name: Build image
123-
run: |
124-
if [[ "${{ matrix.component }}" == "feature-server-dev" ]]; then
125-
docker buildx build \
126-
--platform linux/amd64,linux/arm64 \
127-
-t ${REGISTRY}/feature-server:${GITHUB_SHA} \
128-
-t ${REGISTRY}/feature-server:develop \
129-
-f sdk/python/feast/infra/feature_servers/multicloud/Dockerfile.dev \
130-
--push .
131-
else
132-
make build-${{ matrix.component }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA}
133-
fi
132+
run: make build-${{ matrix.target }}-docker REGISTRY=${REGISTRY} VERSION=${GITHUB_SHA} ${{ matrix.build_args }}
134133
- name: Push image
135134
run: |
136-
if [[ "${{ matrix.component }}" == "feature-server-dev" ]]; then
137-
echo "feature-server dev image pushed via buildx during build step"
135+
if [[ "${{ matrix.push_mode }}" == "imagetools" ]]; then
136+
docker buildx imagetools create -t ${REGISTRY}/feature-server:develop ${REGISTRY}/feature-server:${GITHUB_SHA}
138137
else
139-
docker tag ${REGISTRY}/${{ matrix.component }}:${GITHUB_SHA} ${REGISTRY}/${{ matrix.component }}:develop
140-
docker push ${REGISTRY}/${{ matrix.component }} --all-tags
138+
docker tag ${REGISTRY}/${{ matrix.target }}:${GITHUB_SHA} ${REGISTRY}/${{ matrix.target }}:develop && docker push ${REGISTRY}/${{ matrix.target }} --all-tags
141139
fi

0 commit comments

Comments
 (0)