Skip to content

Commit

Permalink
Merge pull request #290 from israel-hdez/redhatds-v0121-sync
Browse files Browse the repository at this point in the history
Bump red-hat-ds to KServe v0.12.1
  • Loading branch information
openshift-merge-bot[bot] authored May 21, 2024
2 parents d123a37 + 816d95b commit 5be2dd4
Show file tree
Hide file tree
Showing 505 changed files with 252,948 additions and 17,811 deletions.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ assignees: ''

**Anything else you would like to add:**
[Miscellaneous information that will assist in solving the issue.]


**Links to the design documents:**
[Optional, start with the short-form [RFC template](https://docs.google.com/document/d/1UcBeLfZ_JMGpVrPJmYtEIVH_9Y4U3AEKQdq_IKuOMrU) to outline your ideas and get early feedback.]
[Required, use the longer-form [design doc template](https://docs.google.com/document/d/1Mtoui_PP2a9N59NjYHnsvrdJ8t2iKFwIJAx1zRO_I1c) to specify and discuss your design in more detail]
26 changes: 22 additions & 4 deletions .github/actions/free-up-disk-space/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'Free-up disk space action'
description: 'Removes non-essential tools, libraries and cached files from GitHub action runner node'
description: 'Removes non-essential tools, libraries and cached files from GitHub action runner node and changes the docker data directory to /mnt/docker'

runs:
using: "composite"
Expand All @@ -8,7 +8,7 @@ runs:
shell: bash
run: |
echo "Disk usage before cleanup:"
df -h
df -hT
# remove non-essential tools and libraries, see:
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
Expand All @@ -23,12 +23,30 @@ runs:
sudo rm -rf /usr/share/swift
echo "Disk usage after cleanup:"
df -h
df -hT
- name: Prune docker images
shell: bash
run: |
echo "Pruning docker images"
docker image prune -a -f
docker system df
df -h
df -hT
- name: Move docker data directory
shell: bash
run: |
echo "Stopping docker service ..."
sudo systemctl stop docker
DOCKER_DEFAULT_ROOT_DIR=/var/lib/docker
DOCKER_ROOT_DIR=/mnt/docker
echo "Moving ${DOCKER_DEFAULT_ROOT_DIR} -> ${DOCKER_ROOT_DIR}"
sudo mv ${DOCKER_DEFAULT_ROOT_DIR} ${DOCKER_ROOT_DIR}
echo "Creating symlink ${DOCKER_DEFAULT_ROOT_DIR} -> ${DOCKER_ROOT_DIR}"
sudo ln -s ${DOCKER_ROOT_DIR} ${DOCKER_DEFAULT_ROOT_DIR}
echo "$(sudo ls -l ${DOCKER_DEFAULT_ROOT_DIR})"
echo "Starting docker service ..."
sudo systemctl daemon-reload
sudo systemctl start docker
echo "Docker service status:"
sudo systemctl --no-pager -l -o short status docker
4 changes: 4 additions & 0 deletions .github/workflows/agent-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
env:
IMAGE_NAME: kserve-agent

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/alibiexplainer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ on:
pull_request:

env:
IMAGE_NAME: alibi-explainer
IMAGE_NAME: alibi-explainer

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Run tests.
Expand Down Expand Up @@ -59,7 +63,7 @@ jobs:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Export version variable
- name: Export version variable
run: |
IMAGE_ID=kserve/$IMAGE_NAME
Expand All @@ -86,5 +90,3 @@ jobs:
file: python/alibiexplainer.Dockerfile
push: true
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }}


4 changes: 4 additions & 0 deletions .github/workflows/artexplainer-docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
env:
IMAGE_NAME: art-explainer

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/auto-add-issues-to-project.yaml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/automated-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Automated Release
on:
workflow_dispatch:
inputs:
releaseBranch:
description: 'The existing branch name to release from, e.g. release-0.12'
required: true
releaseTag:
description: 'The release tag, e.g. v0.12.0-rc1'
required: true

jobs:
prepare-release:
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21

- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.releaseBranch }}

- name: Install dependencies
run: |
go mod download
- name: Prepare Release
shell: bash
run: |
GOPATH=$(go env GOPATH)
KSERVE_PATH=$GOPATH/src/github.com/kserve/kserve
echo "KSERVE_PATH=$KSERVE_PATH" >> "$GITHUB_ENV"
mkdir -p $KSERVE_PATH
cp -a . $KSERVE_PATH
cd $KSERVE_PATH
export RELEASE_BRANCH=${{ inputs.releaseBranch }}
export RELEASE_TAG=${{ inputs.releaseTag }}
# Bump Versions
make bump-version
./hack/generate-install.sh $RELEASE_TAG
./hack/python-release.sh
# Update Release Branch and Push Tag
git diff
git config --global user.email "terrytangyuan@gmail.com"
git config --global user.name "terrytangyuan"
git add -A
git commit -m "Prepare release" || exit 0
git push
- name: Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ contains(inputs.releaseTag, 'rc') }}
target_commitish: ${{ inputs.releaseBranch }}
tag_name: ${{ inputs.releaseTag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/cherry-pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
- master
types: ["closed"]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
cherry_pick_release_0_10:
runs-on: ubuntu-latest
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/create-release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Create Tag and Release with Changelog

on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag name for the new release'
required: true

permissions:
contents: write
packages: write
pull-requests: write

jobs:
fetch-tag:
runs-on: ubuntu-latest
outputs:
old_tag: ${{ steps.get_tag.outputs.old_tag_name }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0

- name: Get latest tag
id: get_tag
run: |
echo "old_tag_name=$(git ls-remote --tags origin | awk -F'/' '{print $3}' | grep -v '{}' | sort -V | tail -n1)" >> $GITHUB_OUTPUT
- name: print tag
id: print_tag
run: |
echo "Old Tag=${{ steps.get_tag.outputs.old_tag_name }}"
echo "NEW_TAG=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
echo "$(basename ${{ github.ref }})"
- name: Check if tag exists
id: check_tag
run: |
import sys
import subprocess
tag_name = "${{ github.event.inputs.tag_name }}"
command = ['git', 'tag', '-l', tag_name]
output = subprocess.check_output(command, stderr=subprocess.STDOUT)
if output.decode() != "":
print(f"Error: Tag '{tag_name}' already exists.", file=sys.stderr)
sys.exit(1)
else:
print(f"Tag '{tag_name}' does not exists.")
shell: python
continue-on-error: false

#this works only if params.env contains image:tag_version_number
update-params-env:
runs-on: ubuntu-latest
needs: fetch-tag
outputs:
param_env: ${{ steps.read_params_env.outputs.params_env }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Update params.env with new release version
run: |
sed -i 's|:v[0-9.]*\b|:${{ github.event.inputs.tag_name }}|gm' config/overlays/odh/params.env
- name: Commit changes
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "GitHub Actions"
git add config/overlays/odh/params.env
git commit -m "Update image refs for odh release."
- name: Create Tag
id: create_tag
run: |
git tag -a ${{ github.event.inputs.tag_name }} -m "Prepare for ODH release ${{ github.event.inputs.tag_name }}"
git push origin ${{ github.event.inputs.tag_name }}
changelog:
name: Changelog
needs: [fetch-tag,update-params-env]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}

- name: Create Release
uses: softprops/action-gh-release@v2
with:
token: ${{ github.token }}
tag_name: ${{ github.event.inputs.tag_name }}
prerelease: false
draft: false
#this takes the path of payload to upload as an asset in the changelog
files: bin/*
generate_release_notes: true
name: ${{ github.event.inputs.tag_name }}
5 changes: 4 additions & 1 deletion .github/workflows/custom-model-grpc-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
env:
IMAGE_NAME: custom-model-grpc

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
Expand Down Expand Up @@ -72,4 +76,3 @@ jobs:
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
Loading

0 comments on commit 5be2dd4

Please sign in to comment.