Close WS connection when error happens #47
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: Build and push images | |
on: | |
push: | |
branches: [ "main" ] | |
env: | |
DOCKER_REPO_OVERRIDE: quay.io/kevent-mesh | |
AI_DEMO_IMAGE_TAG: main | |
jobs: | |
build: | |
name: build images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print env | |
run: echo "Going to push to container registry ${{ env.DOCKER_REPO_OVERRIDE }} with image tags ${{ env.AI_DEMO_IMAGE_TAG }}" | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install gsutil | |
run: | | |
pip install --no-input gsutil | |
# necessary for Running Red Hat Quay GitHub Action locally | |
- name: Install podman | |
if: ${{ !github.event.act }} # only run when local actions testing | |
run: | | |
sudo apt-get update && sudo apt-get -y install podman | |
- name: Download model files | |
run: | | |
gsutil cp -r gs://knative-ai-demo/kserve-models/knative_01/0001 ./services/inference-service/v1/model | |
ls -la ./services/inference-service/v1/model | |
- name: Build ai-demo-inference-service | |
id: build-ai-demo-inference-service | |
run: docker build services/inference-service/v1 --file services/inference-service/v1/Dockerfile -t ai-demo-inference-service-v1:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-inference-service | |
id: push-ai-demo-inference-service | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-inference-service-v1 | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-inference-service image url | |
run: echo "ai-demo-inference-service image pushed to ${{ steps.push-ai-demo-inference-service.outputs.registry-paths }}" | |
- name: Build ai-demo-upload-service | |
id: build-ai-demo-upload-service | |
run: docker build services/upload-service --file services/upload-service/Dockerfile -t ai-demo-upload-service:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-upload-service | |
id: push-ai-demo-upload-service | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-upload-service | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-upload-service image url | |
run: echo "ai-demo-upload-service image pushed to ${{ steps.push-ai-demo-upload-service.outputs.registry-paths }}" | |
- name: Build ai-demo-minio-webhook-source | |
id: build-ai-demo-minio-webhook-source | |
run: docker build services/minio-webhook-source --file services/minio-webhook-source/Dockerfile -t ai-demo-minio-webhook-source:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-minio-webhook-source | |
id: push-ai-demo-minio-webhook-source | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-minio-webhook-source | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-minio-webhook-source image url | |
run: echo "ai-demo-minio-webhook-source image pushed to ${{ steps.push-ai-demo-minio-webhook-source.outputs.registry-paths }}" | |
- name: Build ai-demo-ui-service | |
id: build-ai-demo-ui-service | |
run: docker build services/ui-service --file services/ui-service/Dockerfile -t ai-demo-ui-service:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-ui-service | |
id: push-ai-demo-ui-service | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-ui-service | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-ui-service image url | |
run: echo "ai-demo-ui-service image pushed to ${{ steps.push-ai-demo-ui-service.outputs.registry-paths }}" | |
- name: Build ai-demo-reply-service | |
id: build-ai-demo-reply-service | |
run: docker build services/reply-service --file services/reply-service/Dockerfile -t ai-demo-reply-service:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-reply-service | |
id: push-ai-demo-reply-service | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-reply-service | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-reply-service image url | |
run: echo "ai-demo-reply-service image pushed to ${{ steps.push-ai-demo-reply-service.outputs.registry-paths }}" | |
- name: Build ai-demo-analytics-service | |
id: build-ai-demo-analytics-service | |
run: docker build services/analytics-service --file services/analytics-service/Dockerfile -t ai-demo-analytics-service:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-analytics-service | |
id: push-ai-demo-analytics-service | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-analytics-service | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-analytics-service image url | |
run: echo "ai-demo-analytics-service image pushed to ${{ steps.push-ai-demo-analytics-service.outputs.registry-paths }}" | |
- name: Build ai-demo-prediction-service | |
id: build-ai-demo-prediction-service | |
run: docker build services/prediction-service --file services/prediction-service/Dockerfile -t ai-demo-prediction-service:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-prediction-service | |
id: push-ai-demo-prediction-service | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-prediction-service | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-prediction-service image url | |
run: echo "ai-demo-prediction-service image pushed to ${{ steps.push-ai-demo-prediction-service.outputs.registry-paths }}" | |
- name: Build ai-demo-feedback-service | |
id: build-ai-demo-feedback-service | |
run: docker build services/feedback-service --file services/feedback-service/Dockerfile -t ai-demo-feedback-service:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-feedback-service | |
id: push-ai-demo-feedback-service | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-feedback-service | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-feedback-service image url | |
run: echo "ai-demo-feedback-service image pushed to ${{ steps.push-ai-demo-feedback-service.outputs.registry-paths }}" | |
- name: Build ai-demo-admin-service | |
id: build-ai-demo-admin-service | |
run: docker build services/admin-service --file services/admin-service/Dockerfile -t ai-demo-admin-service:${{ env.AI_DEMO_IMAGE_TAG }} | |
- name: Push ai-demo-admin-service | |
id: push-ai-demo-admin-service | |
uses: redhat-actions/push-to-registry@v2 | |
with: | |
image: ai-demo-admin-service | |
tags: ${{ env.AI_DEMO_IMAGE_TAG }} | |
registry: ${{ env.DOCKER_REPO_OVERRIDE }} | |
username: ${{ secrets.REGISTRY_USERNAME }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Print ai-demo-admin-service image url | |
run: echo "ai-demo-admin-service image pushed to ${{ steps.push-ai-demo-admin-service.outputs.registry-paths }}" |