Version 1.1.3 of Iter8 Documentation #68
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish A/B/n sample Docker images | |
on: | |
release: | |
types: [published] | |
paths: | |
- samples/abn-sample | |
jobs: | |
# A/B/n sample backend HTTP service | |
build-and-push-backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version | |
run: | | |
tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tagref | |
echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV | |
echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV | |
- name: Get owner | |
run: | | |
ownerrepo=${{ github.repository }} | |
owner=$(echo $ownerrepo | cut -f1 -d/) | |
if [[ "$owner" == "iter8-tools" ]]; then | |
owner=iter8 | |
fi | |
echo "OWNER=$owner" >> $GITHUB_ENV | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_SECRET }} | |
- uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ env.OWNER }}/abn-sample-backend:${{ env.VERSION }}-v1,${{ env.OWNER }}/abn-sample-backend:${{ env.VERSION }}-v2,${{ env.OWNER }}/abn-sample-backend:${{ env.MAJOR_MINOR_VERSION }}-v1,${{ env.OWNER }}/abn-sample-backend:${{ env.MAJOR_MINOR_VERSION }}-v2,${{ env.OWNER }}/abn-sample-backend:latest | |
file: samples/abn-sample/backend/Dockerfile | |
push: true | |
# A/B/n sample frontend where the backend is a simple HTTP server (see above) | |
# Sample frontends are provided in both go and node | |
build-and-push-frontends: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
lang: [go, node] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version | |
run: | | |
tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tagref | |
echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV | |
echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV | |
- name: Get owner | |
run: | | |
ownerrepo=${{ github.repository }} | |
owner=$(echo $ownerrepo | cut -f1 -d/) | |
if [[ "$owner" == "iter8-tools" ]]; then | |
owner=iter8 | |
fi | |
echo "OWNER=$owner" >> $GITHUB_ENV | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_SECRET }} | |
- uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ env.OWNER }}/abn-sample-frontend-${{ matrix.lang }}:${{ env.VERSION }},${{ env.OWNER }}/abn-sample-frontend-${{ matrix.lang }}:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/abn-sample-frontend-${{ matrix.lang }}:latest | |
file: samples/abn-sample/frontend/${{ matrix.lang }}/Dockerfile | |
context: samples/abn-sample/frontend/${{ matrix.lang }} | |
push: true | |
# A/B/n sample frontend for modelmesh-serving | |
# In this case, the backends are models deployed as InferenceServices | |
# This frontend is implemented omly in go | |
build-and-push-mm-frontend: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
lang: [go] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version | |
run: | | |
tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tagref | |
echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV | |
echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV | |
- name: Get owner | |
run: | | |
ownerrepo=${{ github.repository }} | |
owner=$(echo $ownerrepo | cut -f1 -d/) | |
if [[ "$owner" == "iter8-tools" ]]; then | |
owner=iter8 | |
fi | |
echo "OWNER=$owner" >> $GITHUB_ENV | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_SECRET }} | |
- uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ env.OWNER }}/abn-sample-mm-frontend-${{ matrix.lang }}:${{ env.VERSION }},${{ env.OWNER }}/abn-sample-mm-frontend-${{ matrix.lang }}:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/abn-sample-mm-frontend-${{ matrix.lang }}:latest | |
file: samples/abn-sample/mm-frontend/${{ matrix.lang }}/Dockerfile | |
context: samples/abn-sample/mm-frontend/${{ matrix.lang }} | |
push: true | |
# A/B/n sample frontend for KServe w/ HTTP | |
# In this case, the backends are models deployed as InferenceServices | |
# This frontend is implemented omly in go | |
build-and-push-kserve-http-frontend: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
lang: [go] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version | |
run: | | |
tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tagref | |
echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV | |
echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV | |
- name: Get owner | |
run: | | |
ownerrepo=${{ github.repository }} | |
owner=$(echo $ownerrepo | cut -f1 -d/) | |
if [[ "$owner" == "iter8-tools" ]]; then | |
owner=iter8 | |
fi | |
echo "OWNER=$owner" >> $GITHUB_ENV | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_SECRET }} | |
- uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ env.OWNER }}/abn-sample-kserve-http-frontend-${{ matrix.lang }}:${{ env.VERSION }},${{ env.OWNER }}/abn-sample-kserve-http-frontend-${{ matrix.lang }}:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/abn-sample-kserve-http-frontend-${{ matrix.lang }}:latest | |
file: samples/abn-sample/kserve-http-frontend/${{ matrix.lang }}/Dockerfile | |
context: samples/abn-sample/kserve-http-frontend/${{ matrix.lang }} | |
push: true | |
# A/B/n sample frontend for KServe w/ gRPC | |
# In this case, the backends are models deployed as InferenceServices | |
# This frontend is implemented omly in go | |
build-and-push-kserve-grpc-frontend: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
lang: [go] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get version | |
run: | | |
tagref=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') | |
# Strip "v" prefix from tagref | |
echo "VERSION=$(echo $tagref | sed -e 's/^v//')" >> $GITHUB_ENV | |
echo "MAJOR_MINOR_VERSION=$(echo $tagref | sed -e 's/^v//' -e 's,\([0-9]*\.[0-9]*\)\.\([0-9]*\),\1,')" >> $GITHUB_ENV | |
- name: Get owner | |
run: | | |
ownerrepo=${{ github.repository }} | |
owner=$(echo $ownerrepo | cut -f1 -d/) | |
if [[ "$owner" == "iter8-tools" ]]; then | |
owner=iter8 | |
fi | |
echo "OWNER=$owner" >> $GITHUB_ENV | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_SECRET }} | |
- uses: docker/build-push-action@v5 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
tags: ${{ env.OWNER }}/abn-sample-kserve-grpc-frontend-${{ matrix.lang }}:${{ env.VERSION }},${{ env.OWNER }}/abn-sample-kserve-grpc-frontend-${{ matrix.lang }}:${{ env.MAJOR_MINOR_VERSION }},${{ env.OWNER }}/abn-sample-kserve-grpc-frontend-${{ matrix.lang }}:latest | |
file: samples/abn-sample/kserve-grpc-frontend/${{ matrix.lang }}/Dockerfile | |
context: samples/abn-sample/kserve-grpc-frontend/${{ matrix.lang }} | |
push: true | |