Skip to content

Commit c4bb419

Browse files
committed
chore: remove example secrets and refactor workflows
Signed-off-by: [Your Name] <your.email@example.com> Signed-off-by: Artemy <ahladenk@redhat.com>
1 parent b89d2f0 commit c4bb419

File tree

7 files changed

+33
-59
lines changed

7 files changed

+33
-59
lines changed

.github/workflows/live-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
7777
for i in {1..60}; do
7878
curl -fsS http://127.0.0.1:8321/v1/health 2>/dev/null | grep -q '"status":"OK"' && break
79-
[ $i -eq 60 ] && { docker logs llama-stack-vertex; docker rm -f llama-stack-vertex; exit 1; }
79+
[ "$i" -eq 60 ] && { docker logs llama-stack-vertex; docker rm -f llama-stack-vertex; exit 1; }
8080
sleep 1
8181
done
8282
@@ -109,7 +109,7 @@ jobs:
109109
mkdir -p "$REPO_RECORDINGS_DIR"
110110
echo "$PROVIDER_RECORDINGS" | while IFS= read -r recording; do
111111
[ -n "$recording" ] && [ -f "$recording" ] && {
112-
relative_path=$(echo "$recording" | sed "s|^$RECORDINGS_DIR/||")
112+
relative_path="${recording#"$RECORDINGS_DIR"/}"
113113
mkdir -p "$REPO_RECORDINGS_DIR/$(dirname "$relative_path")"
114114
cp "$recording" "$REPO_RECORDINGS_DIR/$relative_path"
115115
}
@@ -159,7 +159,7 @@ jobs:
159159
160160
# Copy all recordings
161161
find "$REPO_RECORDINGS_DIR" -type f | while IFS= read -r recording; do
162-
relative_path=$(echo "$recording" | sed "s|^$REPO_RECORDINGS_DIR/||")
162+
relative_path="${recording#"$REPO_RECORDINGS_DIR"/}"
163163
mkdir -p "$(dirname "$TARGET_RECORDINGS_DIR/$relative_path")"
164164
cp "$recording" "$TARGET_RECORDINGS_DIR/$relative_path"
165165
done

.github/workflows/redhat-distro-container.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,8 @@ jobs:
115115
WORK_DIR="/tmp/llama-stack-integration-tests"
116116
# Clone llama-stack to check for recordings
117117
if [ ! -d "$WORK_DIR" ]; then
118-
# Get llama-stack version from Containerfile
119-
CONTAINERFILE="distribution/Containerfile"
120-
GIT_URL=$(grep -o 'git+https://github\.com/[^/]\+/llama-stack\.git@v\?[0-9.+a-z]\+' "$CONTAINERFILE")
121-
LLAMA_STACK_REPO=${GIT_URL#git+}
122-
LLAMA_STACK_REPO=${LLAMA_STACK_REPO%%@*}
123-
LLAMA_STACK_VERSION=${GIT_URL##*@}
124-
LLAMA_STACK_VERSION=${LLAMA_STACK_VERSION#v}
118+
# Get llama-stack repo and version from Containerfile
119+
source scripts/extract-llama-stack-info.sh
125120
126121
git clone "$LLAMA_STACK_REPO" "$WORK_DIR"
127122
cd "$WORK_DIR"

.github/workflows/test-pr.json.example

Lines changed: 0 additions & 16 deletions
This file was deleted.

.secrets.example

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
# Extract llama-stack repository and version from Containerfile
3+
# Usage: source scripts/extract-llama-stack-info.sh
4+
# Sets: LLAMA_STACK_REPO and LLAMA_STACK_VERSION
5+
6+
set -euo pipefail
7+
8+
CONTAINERFILE="${1:-distribution/Containerfile}"
9+
GIT_URL=$(grep -o 'git+https://github\.com/[^/]\+/llama-stack\.git@v\?[0-9.+a-z]\+' "$CONTAINERFILE")
10+
11+
if [ -z "$GIT_URL" ]; then
12+
echo "Error: Could not extract llama-stack git URL from Containerfile" >&2
13+
exit 1
14+
fi
15+
16+
LLAMA_STACK_REPO="${GIT_URL#git+}"
17+
LLAMA_STACK_REPO="${LLAMA_STACK_REPO%%@*}"
18+
LLAMA_STACK_VERSION="${GIT_URL##*@}"
19+
LLAMA_STACK_VERSION="${LLAMA_STACK_VERSION#v}"
20+
21+
if [ -z "$LLAMA_STACK_VERSION" ]; then
22+
echo "Error: Could not extract llama-stack version from Containerfile" >&2
23+
exit 1
24+
fi
25+

scripts/run-live-tests-local.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ case "$PROVIDER" in
6565
echo "Please run: gcloud auth application-default login"
6666
exit 1
6767
fi
68-
68+
6969
ENV_ARGS="-e VERTEX_AI_PROJECT=\"$VERTEX_AI_PROJECT\" -e VERTEX_AI_LOCATION=\"$VERTEX_AI_LOCATION\" -e GOOGLE_APPLICATION_CREDENTIALS=/run/secrets/gcp-credentials -e GOOGLE_CLOUD_PROJECT=\"$VERTEX_AI_PROJECT\""
7070
# Check if podman secret exists, create if not
7171
if ! podman secret exists gcp-credentials 2>/dev/null; then

tests/run_integration_tests.sh

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,8 @@ INFERENCE_MODEL="${INFERENCE_MODEL:-Qwen/Qwen3-0.6B}"
99
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1010

1111
# Get repository and version dynamically from Containerfile
12-
# Look for git URL format: git+https://github.com/*/llama-stack.git@vVERSION or @VERSION
13-
CONTAINERFILE="$SCRIPT_DIR/../distribution/Containerfile"
14-
GIT_URL=$(grep -o 'git+https://github\.com/[^/]\+/llama-stack\.git@v\?[0-9.+a-z]\+' "$CONTAINERFILE")
15-
if [ -z "$GIT_URL" ]; then
16-
echo "Error: Could not extract llama-stack git URL from Containerfile"
17-
exit 1
18-
fi
19-
20-
# Extract repo URL (remove git+ prefix and @version suffix)
21-
LLAMA_STACK_REPO=${GIT_URL#git+}
22-
LLAMA_STACK_REPO=${LLAMA_STACK_REPO%%@*}
23-
# Extract version (remove git+ prefix and everything before @, and optional v prefix)
24-
LLAMA_STACK_VERSION=${GIT_URL##*@}
25-
LLAMA_STACK_VERSION=${LLAMA_STACK_VERSION#v}
26-
if [ -z "$LLAMA_STACK_VERSION" ]; then
27-
echo "Error: Could not extract llama-stack version from Containerfile"
28-
exit 1
29-
fi
12+
# shellcheck source=scripts/extract-llama-stack-info.sh
13+
source "$SCRIPT_DIR/../scripts/extract-llama-stack-info.sh"
3014

3115
function clone_llama_stack() {
3216
# Clone the repository if it doesn't exist

0 commit comments

Comments
 (0)