Skip to content

V2 Build docker images #662

V2 Build docker images

V2 Build docker images #662

Workflow file for this run

name: V2 Build docker images
on:
push:
branches: [v2]
workflow_dispatch:
inputs:
docker-tag:
description: "Docker tag for push"
default: "latest"
required: false
jobs:
test:
name: test
runs-on: ubuntu-latest
if: github.repository == 'SeldonIO/seldon-core' # Do not run this on forks.
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: false
- name: test-operator
run: make -C operator test
- name: test-scheduler
run: make -C scheduler test
- name: test-hodometer
run: make -C hodometer test-hodometer
- name: test-components-tls
run: make -C components/tls test
- name: test-components-kafka
run: make -C components/kafka test
docker:
needs: test
runs-on: ubuntu-latest
if: github.repository == 'SeldonIO/seldon-core' # Do not run this on forks.
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
remove-dotnet: 'true'
remove-haskell: 'true'
remove-android: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
overprovision-lvm: 'true'
swap-size-mb: 1024
- name: Checkout Git Commit
uses: actions/checkout@v4
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set default docker tag for builds from master
id: docker-tag
run: |
USER_INPUT="${{ github.event.inputs.docker-tag }}"
echo "value=${USER_INPUT:-latest}" >> $GITHUB_OUTPUT
- name: Echo the tags that will be used to push images
run: echo "Will push images with tag ${{ steps.docker-tag.outputs.value }}"
- name: Push Docker Image for Operator
working-directory: ./operator
run: CUSTOM_IMAGE_TAG=${{ steps.docker-tag.outputs.value }} make docker-build docker-push
- name: Push Docker Image for Seldon Cli
working-directory: ./operator
run: CUSTOM_IMAGE_TAG=${{ steps.docker-tag.outputs.value }} make docker-build-cli docker-push-cli
- name: Push Docker Images for Scheduler
working-directory: ./scheduler
run: CUSTOM_IMAGE_TAG=${{ steps.docker-tag.outputs.value }} make docker-build-all docker-push-all
- name: Push Docker Images for Hodometer
working-directory: ./hodometer
run: BUILD_VERSION=${{ steps.docker-tag.outputs.value }} IMAGE_TAG=${{ steps.docker-tag.outputs.value }} make build-hodometer-docker push-hodometer-docker
- name: Push Docker Image for k6 Load Testing
working-directory: ./tests/k6
run: CUSTOM_IMAGE_TAG=${{ steps.docker-tag.outputs.value }} make docker-build docker-push