[go: nahoru, domu]

Skip to content

Commit

Permalink
ci: Add download_github_project_tarball()
Browse files Browse the repository at this point in the history
This function will hel us to get the tarball, from a github project,
that we're going to use as part of our tests.

Right now this is not used anywhere, but it'll soon enough (as part of
this series) be used to download the cri-containerd / cri-tools / cni
tarballs.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
  • Loading branch information
fidencio committed Jul 21, 2023
1 parent 788c562 commit ad47d1b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -360,3 +360,14 @@ function get_latest_patch_release_from_a_github_project() {

curl --silent https://api.github.com/repos/${project}/releases | jq -r .[].tag_name | grep "^${base_version}.[0-9]*$" -m1
}

# project: org/repo format
# version: the version of the tarball that will be downloaded
# tarball-name: the name of the tarball that will be downloaded
function download_github_project_tarball() {
project="${1}"
version="${2}"
tarball_name="${3}"

wget https://github.com/${project}/releases/download/${version}/${tarball_name}
}

0 comments on commit ad47d1b

Please sign in to comment.