File tree Expand file tree Collapse file tree 8 files changed +55
-19
lines changed
Expand file tree Collapse file tree 8 files changed +55
-19
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,5 @@ updates:
1313 groups :
1414 github-actions :
1515 patterns : ["*"]
16- labels :
17- - automation
18- - gha-update
1916
2017# TODO: Add web app python dependencies
Original file line number Diff line number Diff line change 1010 - ready_for_review
1111 - reopened
1212 branches :
13- - master
13+ - main
1414
1515# Use the head ref for workflow concurrency, with cancellation
1616# This should mean that any previous workflows for a PR get cancelled when a new commit is pushed
5757 with :
5858 cluster_name : ${{ env.CLUSTER_NAME }}
5959
60+ # NOTE(scott): Since the local Chart.yaml uses "appVersion: latest" and this
61+ # only gets overwritten to the correct commit SHA during Helm chart build,
62+ # we need to pull these published images and load them into the kind cluster
63+ # with the tag correct tag.
64+ - name : Load tagged container images into kind cluster
65+ run : ./kind-images.sh ${{ github.event.pull_request.head.sha }} ${{ env.CLUSTER_NAME }}
66+ working-directory : web-apps
67+
6068 - name : Add Helm repos for dependencies
6169 run : |
6270 helm repo add stakater https://stakater.github.io/stakater-charts
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ type: application
99
1010# The version and appVersion are updated by the chart build script
1111version : 0.1.0
12- appVersion : master
12+ appVersion : local
1313
1414icon : https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.svg
1515
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ type: application
99
1010# The version and appVersion are updated by the chart build script
1111version : 0.1.0
12- appVersion : master
12+ appVersion : local
1313
1414icon : https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.svg
1515
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ type: application
99
1010# The version and appVersion are updated by the chart build script
1111version : 0.1.0
12- appVersion : master
12+ appVersion : local
1313
1414icon : https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.svg
1515
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4- build () {
5- if [[ -f $1 /Dockerfile ]]; then
6- echo Building $1 docker image
7- docker build . -t ghcr.io/stackhpc/azimuth-llm-$1 -f $1 /Dockerfile
8- else
9- echo No Dockerfile found for $1
10- fi
11- }
4+ source functions.sh
125
136# If a single app is provided as a
147# script arg then just build that image,
158# otherwise try building all images.
169if [[ ! -z $1 ]]; then
1710 build $1
1811else
19- for item in $( ls) ; do
20- if [[ -d $item ]]; then
21- build $item
22- fi
12+ for image in $( find_images .) ; do
13+ build $image
2314 done
2415fi
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ find_images () {
4+ images=" "
5+ for dir in $( ls $1 ) ; do
6+ if [[ -f $1 /$dir /Dockerfile ]]; then
7+ images+=" $dir "
8+ fi
9+ done
10+ echo $images
11+ }
12+
13+ build () {
14+ if [[ -f $1 /Dockerfile ]]; then
15+ echo Building $1 docker image
16+ docker build . -t ghcr.io/stackhpc/azimuth-llm-$1 -ui -f $1 /Dockerfile
17+ else
18+ echo No Dockerfile found for $1
19+ fi
20+ }
Original file line number Diff line number Diff line change 1+ set -e
2+
3+ source functions.sh
4+
5+ if [[ -z $1 ]]; then
6+ echo " Published image tag must be provided as sole command line arg"
7+ exit 1
8+ fi
9+
10+ REMOTE_TAG=$1
11+ CLUSTER_NAME=${2:- kind}
12+ echo Kind cluster name: $CLUSTER_NAME
13+ KIND_TAG=local
14+ for image in $( find_images .) ; do
15+ full_name=ghcr.io/stackhpc/azimuth-llm-$image -ui
16+ echo $full_name
17+ docker pull $full_name :$REMOTE_TAG
18+ docker image tag $full_name :$REMOTE_TAG $full_name :$KIND_TAG
19+ kind load docker-image -n $CLUSTER_NAME $full_name :$KIND_TAG
20+ done
You can’t perform that action at this time.
0 commit comments