Commit Graph

14 Commits

Author SHA1 Message Date
Niels de Vos
955559a235 ci: use Helm 3.1.2 in test container
By default a version of Helm is used that does not want to get
installed. Using the same version as the devel branch makes the testing
work again.

See-also: helm/helm#9617
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-04-20 07:08:16 +00:00
Niels de Vos
1c2974d49e ci: the "master" branch got renamed to "devel"
Closes: #1193
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-03-01 05:22:06 +00:00
Niels de Vos
d610c51007 ci: detect latest version with "Kubernetes" prefix
New Kubernetes versions are now prefixed with "Kubernetes", like:

    $ ./scripts/get_patch_release.py
    Kubernetes v1.18.13
    Kubernetes v1.17.15
    Kubernetes v1.19.5
    Kubernetes v1.20.0
    Kubernetes v1.20.0-rc.0
    v1.20.0-beta.2
    v1.18.12
    v1.19.4
    v1.17.14
    v1.20.0-beta.1
    v1.20.0-beta.0
    v1.20.0-alpha.3
    v1.18.10
    v1.17.13

The new "Kubernetes" prefix prevents the current logic to not match the
version. By splitting the returned version string on words, and
returning the last component in get_releases(), the script works as
intended again.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-12-16 04:47:42 +00:00
Niels de Vos
5db647ba64 ci: do not mark script changes as doc-only
Changes in scripts will affect the CI jobs as the scripts are used while
deploying minikube, Rook and other components. These changes need
testing, just like anything else.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-11-26 07:01:17 +00:00
Niels de Vos
a9014ce2ce ci: add script to detect need of container image rebuild
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-11-04 05:52:01 +00:00
Niels de Vos
535315cc29 ci: prevent detecting latest Kubernetes patch release
In case the version that is passed with --version=... contains the patch
release already, the latest patch release will not be detected, but the
passed version will be returned (enables forcing a particular version in
CI jobs).

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-10-15 09:28:39 +00:00
Niels de Vos
dd7ac1f18e ci: log rate limit in case the GitHub API returns 403
Anonymous users have a low (currently 60) rate limit of API calls.
Authorized users have a much higher (currently 5000) limit. Print the
available, used and remainling rate limit when the GitHub API returns a
403 messages like:

    Error: 403 Client Error: rate limit exceeded

In case of anonymous access to the API, and hitting the limit, the
message in the logs will also include the following:

    Rate limit (limit/used/remaining): 60/60/0

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-10-14 15:30:32 +02:00
Niels de Vos
b27b2ee074 ci: authenticate with GitHub API token from the environment
These script now check if GITHUB_API_TOKEN is set in the environment,
and use that for authenticating. There is no username needed when an API
token is used, but it may not be empty, so it is set to "unused".

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-10-13 12:05:57 +00:00
Niels de Vos
aa062513c0 ci: report connections failures with GitHub API
On occasion the scripts that use the GitHub API fail without logging any
useful error:

    ./scripts/get_github_labels.py --id=1568 --has-label=ci/skip/e2e
    Traceback (most recent call last):
      File "./scripts/get_github_labels.py", line 71, in <module>
        main()
      File "./scripts/get_github_labels.py", line 55, in main
        names = get_names(json)
      File "./scripts/get_github_labels.py", line 40, in get_names
        names.append(label['name'])
    TypeError: string indices must be integers

While debugging, it seems that the limit of API calls is reached:

    403 Client Error: rate limit exceeded

It is useful to have failure messages reported in the output of the CI
jobs for future potential troubleshooting.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-10-13 12:05:57 +00:00
Niels de Vos
73244ab07b ci: add script to detect latest Kubernetes patch release
By using this script, we can pass Kubernetes versions like v1.19 to the
CI jobs. The jobs are then responsible for detecting the a full release
version, including the '.patch' suffix.

Versions are passed as 1.19, releases have the 'v' prefix as in v1.19.1.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-15 17:02:04 +05:30
Niels de Vos
d172010e52 ci: add script to fetch labels for GitHub PR
By passing `--id=<id>` the labels of the given Pull-Request or Issue get
printed. When adding `--has-label=<label>`, the script verifies if the
label is set and returns 0 on succes, or 1 on failure.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-24 08:51:46 +00:00
Niels de Vos
23c317b05a ci: mark .commitlintrc.yml as doc-only
Signed-off-by: Niels de Vos <ndevos@redhat.com>
(cherry picked from commit fb9ae06b1f)
2020-08-19 10:04:19 +00:00
Niels de Vos
693d7b953e ci: skip containerized-tests for doc-only PRs
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-12 16:04:26 +00:00
Niels de Vos
65a2794e60 ci: add 'make test' target to validate CI job scripts
This merges several files from the master branch into ci/centos so that
the scripts, MarkDown and yaml files can be checked.

Run 'make' or 'make test' to validate the contents of this branch.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-05-27 12:52:21 +02:00