-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from stackhpc/refactor-workflows
Fix PR test job
- Loading branch information
Showing
8 changed files
with
55 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
build() { | ||
if [[ -f $1/Dockerfile ]]; then | ||
echo Building $1 docker image | ||
docker build . -t ghcr.io/stackhpc/azimuth-llm-$1 -f $1/Dockerfile | ||
else | ||
echo No Dockerfile found for $1 | ||
fi | ||
} | ||
source functions.sh | ||
|
||
# If a single app is provided as a | ||
# script arg then just build that image, | ||
# otherwise try building all images. | ||
if [[ ! -z $1 ]]; then | ||
build $1 | ||
else | ||
for item in $(ls); do | ||
if [[ -d $item ]]; then | ||
build $item | ||
fi | ||
for image in $(find_images .); do | ||
build $image | ||
done | ||
fi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
find_images() { | ||
images="" | ||
for dir in $(ls $1); do | ||
if [[ -f $1/$dir/Dockerfile ]]; then | ||
images+="$dir " | ||
fi | ||
done | ||
echo $images | ||
} | ||
|
||
build() { | ||
if [[ -f $1/Dockerfile ]]; then | ||
echo Building $1 docker image | ||
docker build . -t ghcr.io/stackhpc/azimuth-llm-$1-ui -f $1/Dockerfile | ||
else | ||
echo No Dockerfile found for $1 | ||
fi | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
set -e | ||
|
||
source functions.sh | ||
|
||
if [[ -z $1 ]]; then | ||
echo "Published image tag must be provided as sole command line arg" | ||
exit 1 | ||
fi | ||
|
||
REMOTE_TAG=$1 | ||
CLUSTER_NAME=${2:-kind} | ||
echo Kind cluster name: $CLUSTER_NAME | ||
KIND_TAG=local | ||
for image in $(find_images .); do | ||
full_name=ghcr.io/stackhpc/azimuth-llm-$image-ui | ||
echo $full_name | ||
docker pull $full_name:$REMOTE_TAG | ||
docker image tag $full_name:$REMOTE_TAG $full_name:$KIND_TAG | ||
kind load docker-image -n $CLUSTER_NAME $full_name:$KIND_TAG | ||
done |