Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit ef00036

Browse files
authored
Merge pull request #868 from Pennyzct/detect_yq
ci: detect the existence of yq before using filter scheme on aarch64
2 parents adb4fa0 + 36dcdf0 commit ef00036

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.ci/aarch64/filter_docker_aarch64.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ it_skip_flag="docker.It"
1919
# value for '-skip' in ginkgo
2020
_skip_options=()
2121

22+
source "${ci_dir}/lib.sh"
23+
2224
filter_and_build()
2325
{
2426
local dependency="$1"
@@ -33,6 +35,8 @@ filter_and_build()
3335

3436
main()
3537
{
38+
# install yq if not exist
39+
[ -z "$(command -v yq)" ] && install_yq
3640
# build skip option based on Describe block
3741
filter_and_build "${describe_skip_flag}"
3842

.ci/aarch64/filter_test_aarch64.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,12 @@ test_filter_flag="test"
1616

1717
_test_union=()
1818

19+
source "${ci_dir}/lib.sh"
20+
1921
main()
2022
{
23+
# install yq if not exist
24+
[ -z "$(command -v yq)" ] && install_yq
2125
local array_test=$("${GOPATH_LOCAL}/bin/yq" read "${test_config_file}" "${test_filter_flag}")
2226
[ "${array_test}" = "null" ] && return
2327
mapfile -t _array_test <<< "${array_test}"

.ci/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function install_yq() {
121121
yq_version=$(basename "${yq_latest_url}")
122122

123123
local yq_url="https://${yq_pkg}/releases/download/${yq_version}/yq_${goos}_${goarch}"
124-
curl -o "${yq_path}" -L ${yq_url}
124+
curl -o "${yq_path}" -LSs ${yq_url}
125125
chmod +x ${yq_path}
126126

127127
if ! command -v "${yq_path}" >/dev/null; then

0 commit comments

Comments
 (0)