fix(ci): remove go-yq check (#3364)
This commit is contained in:
+21
-24
@@ -33,30 +33,27 @@ sync_tag() {
|
|||||||
echo "Updating home of ${chartname}..."
|
echo "Updating home of ${chartname}..."
|
||||||
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
|
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
|
||||||
echo "Attempting to update sources of ${chartname}..."
|
echo "Attempting to update sources of ${chartname}..."
|
||||||
# Only update source if go-yq is installed
|
go-yq -V
|
||||||
if [ $(command -v go-yq) ]; then
|
# Get all sources (except truecharts)
|
||||||
go-yq -V
|
curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
|
||||||
# Get all sources (except truecharts)
|
echo "${chartname}: $curr_sources"
|
||||||
curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
|
echo "${chartname}: After getting all sources"
|
||||||
echo "${chartname}: $curr_sources"
|
cat "${chart}/Chart.yaml"
|
||||||
echo "${chartname}: After getting all sources"
|
# Empty sources list in-place
|
||||||
cat "${chart}/Chart.yaml"
|
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
|
||||||
# Empty sources list in-place
|
echo "${chartname}: After deleting all sources"
|
||||||
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
|
cat "${chart}/Chart.yaml"
|
||||||
echo "${chartname}: After deleting all sources"
|
# Add truechart source
|
||||||
cat "${chart}/Chart.yaml"
|
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
|
||||||
# Add truechart source
|
echo "${chartname}: After adding tc source"
|
||||||
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
|
cat "${chart}/Chart.yaml"
|
||||||
echo "${chartname}: After adding tc source"
|
# Add the rest of the sources
|
||||||
cat "${chart}/Chart.yaml"
|
while IFS= read -r line; do
|
||||||
# Add the rest of the sources
|
src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml"
|
||||||
while IFS= read -r line; do
|
done <<< "$curr_sources"
|
||||||
src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml"
|
echo "${chartname}: After adding the rest of the sources"
|
||||||
done <<< "$curr_sources"
|
cat "${chart}/Chart.yaml"
|
||||||
echo "${chartname}: After adding the rest of the sources"
|
echo "Sources of ${chartname} updated!"
|
||||||
cat "${chart}/Chart.yaml"
|
|
||||||
echo "Sources of ${chartname} updated!"
|
|
||||||
fi;
|
|
||||||
}
|
}
|
||||||
export -f sync_tag
|
export -f sync_tag
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
name: Test SCALE Catalog
|
name: Test SCALE Catalog
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/truecharts/devcontainer:v2.6.0@sha256:395ee7ed8b9cba6569ddeba77b7ceb86fdb79b91a19c639625d7bc54cb1ccc1d
|
image: ghcr.io/truecharts/devcontainer:v2.6.0@sha256:992e3c1df7245846a4d8f30fb0f21dc259d245ff41b3a1901284bdb26f4cb4cd
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
||||||
name: Checkout
|
name: Checkout
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/truecharts/devcontainer:v2.6.0@sha256:395ee7ed8b9cba6569ddeba77b7ceb86fdb79b91a19c639625d7bc54cb1ccc1d
|
image: ghcr.io/truecharts/devcontainer:v2.6.0@sha256:992e3c1df7245846a4d8f30fb0f21dc259d245ff41b3a1901284bdb26f4cb4cd
|
||||||
concurrency: gitpush
|
concurrency: gitpush
|
||||||
steps:
|
steps:
|
||||||
- name: Install Kubernetes tools
|
- name: Install Kubernetes tools
|
||||||
|
|||||||
+21
-24
@@ -302,30 +302,27 @@ sync_tag() {
|
|||||||
echo "Updating home of ${chartname}..."
|
echo "Updating home of ${chartname}..."
|
||||||
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
|
sed -i -e "s|home: .*|home: https:\/\/truecharts.org\/docs\/charts\/${train}\/${chartname}|" "${chart}/Chart.yaml"
|
||||||
echo "Attempting to update sources of ${chartname}..."
|
echo "Attempting to update sources of ${chartname}..."
|
||||||
# Only update source if go-yq is installed
|
go-yq -V
|
||||||
if [ $(command -v go-yq) ]; then
|
# Get all sources (except truecharts)
|
||||||
go-yq -V
|
curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
|
||||||
# Get all sources (except truecharts)
|
echo "${chartname}: $curr_sources"
|
||||||
curr_sources=$(go-yq '.sources[] | select(. != "https://github.com/truecharts*")' "${chart}/Chart.yaml")
|
echo "${chartname}: After getting all sources"
|
||||||
echo "${chartname}: $curr_sources"
|
cat "${chart}/Chart.yaml"
|
||||||
echo "${chartname}: After getting all sources"
|
# Empty sources list in-place
|
||||||
cat "${chart}/Chart.yaml"
|
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
|
||||||
# Empty sources list in-place
|
echo "${chartname}: After deleting all sources"
|
||||||
go-yq -i 'del(.sources.[])' "${chart}/Chart.yaml"
|
cat "${chart}/Chart.yaml"
|
||||||
echo "${chartname}: After deleting all sources"
|
# Add truechart source
|
||||||
cat "${chart}/Chart.yaml"
|
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
|
||||||
# Add truechart source
|
echo "${chartname}: After adding tc source"
|
||||||
tcsource="https://github.com/truecharts/charts/tree/master/charts/$train/$chartname" go-yq -i '.sources += env(tcsource)' "${chart}/Chart.yaml"
|
cat "${chart}/Chart.yaml"
|
||||||
echo "${chartname}: After adding tc source"
|
# Add the rest of the sources
|
||||||
cat "${chart}/Chart.yaml"
|
while IFS= read -r line; do
|
||||||
# Add the rest of the sources
|
src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml"
|
||||||
while IFS= read -r line; do
|
done <<< "$curr_sources"
|
||||||
src="$line" go-yq -i '.sources += env(src)' "${chart}/Chart.yaml"
|
echo "${chartname}: After adding the rest of the sources"
|
||||||
done <<< "$curr_sources"
|
cat "${chart}/Chart.yaml"
|
||||||
echo "${chartname}: After adding the rest of the sources"
|
echo "Sources of ${chartname} updated!"
|
||||||
cat "${chart}/Chart.yaml"
|
|
||||||
echo "Sources of ${chartname} updated!"
|
|
||||||
fi;
|
|
||||||
}
|
}
|
||||||
export -f sync_tag
|
export -f sync_tag
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user