hcloud-okd4 icon indicating copy to clipboard operation
hcloud-okd4 copied to clipboard

make fetch doesnt work

Open Q-efx opened this issue 1 year ago • 1 comments

root@dev-server:~/hcloud-okd4# make fetch wget -O openshift-install-linux-none.tar.gz https://github.com/openshift/okd/releases/download/none/openshift-install-linux-none.tar.gz --2022-08-31 10:02:15-- https://github.com/openshift/okd/releases/download/none/openshift-install-linux-none.tar.gz Resolving github.com (github.com)... 140.82.121.4 Connecting to github.com (github.com)|140.82.121.4|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://github.com/okd-project/okd/releases/download/none/openshift-install-linux-none.tar.gz [following] --2022-08-31 10:02:15-- https://github.com/okd-project/okd/releases/download/none/openshift-install-linux-none.tar.gz Reusing existing connection to github.com:443. HTTP request sent, awaiting response... 404 Not Found 2022-08-31 10:02:16 ERROR 404: Not Found.

Q-efx avatar Aug 31 '22 10:08 Q-efx

Hi,

the make fetch command depends on the ENV OPENSHIFT_RELEASE. Set it to a fixed OKD Version or use

export OPENSHIFT_RELEASE=$(make latest_version)

to get the latest version via the GitHub API.

slauger avatar Aug 31 '22 14:08 slauger

make latest_version currently doesn't work because the url has changed:

jq: error (at <stdin>:5): Cannot index object with number
make: *** [Makefile:36: latest_version_okd] Error 5

Reason: The OKD Repo has been moved:

curl https://api.github.com/repos/openshift/okd/tags
{
  "message": "Moved Permanently",
  "url": "https://api.github.com/repositories/222003131/tags",
  "documentation_url": "https://docs.github.com/v3/#http-redirects"
}

I guess the URL in the Makefile needs to be changed:

latest_version_okd:
	@curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/okd-project/okd/tags | jq -j -r .[0].name

Workaround: Set the version manually to the latest tag. E.g.:

export OPENSHIFT_RELEASE=4.11.0-0.okd-2022-08-20-022919

schuemann avatar Sep 03 '22 13:09 schuemann

Thanks for the hint! I fixed the GitHub API call and now everything works as expected:

-bash$ make latest_version_ocp
4.10.28

-bash$ make latest_version_okd
4.11.0-0.okd-2022-08-20-022919

slauger avatar Sep 05 '22 04:09 slauger

See https://github.com/slauger/hcloud-okd4/commit/8e56503341f3de2eefd6f33c1c62e32e393dd06a

slauger avatar Sep 05 '22 04:09 slauger