Skip to content

Commit 6ec58c2

Browse files
authored
ci: Fix build for dev (#209)
* Fix util-team-charts * Fix source url to use githubusercontent * Adjust new var names and add defaults * Correct for commented out defaults
1 parent 1d94b9b commit 6ec58c2

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

build.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
rancherProjectMonitoringVersion: 0.5.1
22
rancherMonitoringVersion : latest
33
k3sTestingMaxVersion: v1.32.1+k3s1
4-
k3sTestingMinVersion: v1.30.9+k3s1
4+
k3sTestingMinVersion: v1.30.9+k3s1
5+
6+
# Dev use only
7+
# devChartsSource: https://github.com/{Dev}/ob-team-charts
8+
# devChartsBranch: {your branch}

scripts/util-team-charts

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
#!/usr/bin/env bash
2+
set -x
3+
4+
5+
CHARTS_REPO="https://raw.githubusercontent.com/rancher/ob-team-charts"
6+
CHARTS_BRANCH="main"
7+
8+
if grep -v "#" "$BUILD_YAML_PATH"| grep 'devChartsSource'; then
9+
TMP_CHARTS_REPO=$(grep 'devChartsSource' "$BUILD_YAML_PATH"|cut -d" " -f2|tr -d ' ')
10+
CHARTS_REPO=$(echo "$TMP_CHARTS_REPO" | sed 's/github\.com/raw\.githubusercontent\.com/g')
11+
fi
12+
if grep -v "#" "$BUILD_YAML_PATH"| grep 'devChartsBranch'; then
13+
CHARTS_BRANCH=$(grep 'devChartsBranch' "$BUILD_YAML_PATH"|cut -d: -f2|tr -d ' ')
14+
fi
15+
216

317
function fetch-team-charts-index() {
4-
TEAM_INDEX="https://raw.githubusercontent.com/rancher/ob-team-charts/refs/heads/main/index.yaml"
18+
TEAM_INDEX="$CHARTS_REPO/refs/heads/$CHARTS_BRANCH/index.yaml"
519
BUILD_DIR="./build"
620
LOCAL_FILE="$BUILD_DIR/charts-index.yaml"
721
LOCAL_ETAG_FILE="$BUILD_DIR/charts-index.etag"
@@ -49,7 +63,7 @@ function newest-chart-version() {
4963

5064
function fetch-team-chart() {
5165
CHART_TARGET="${1}"
52-
BASE_FETCH_URL="https://raw.githubusercontent.com/rancher/ob-team-charts/refs/heads/main/assets"
66+
BASE_FETCH_URL="$CHARTS_REPO/refs/heads/$CHARTS_BRANCH/assets"
5367
CHART_VERSION="${2}"
5468
FETCH_URL="${BASE_FETCH_URL}/${CHART_TARGET}/${CHART_TARGET}-${CHART_VERSION}.tgz"
5569
echo "Fetching version $CHART_VERSION of $CHART_TARGET"

0 commit comments

Comments
 (0)