Commit Graph

106 Commits

Author SHA1 Message Date
Niels de Vos
79225080f9 ci: sandbox is not a supported option
The Jenkins Jobs Builder files reference 'sandbox: true' as an option,
but this does not exist (anymore). Having the option causes warnings in
the Jenkins WebUI for admin users.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-22 11:59:31 +02:00
Niels de Vos
cb4fd5338b ci: correct referencing template for upgrade-tests jobs
Fixes: #1489
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-22 11:59:31 +02:00
Yug
2e2df0a877 ci: Add template file for upgrade-tests job
This template file contains the configuration
parameters for the upgrade-tests job.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-09-22 07:25:00 +00:00
Yug
447e2b1ae4 ci: Add 'upgrade-tests' job to centos ci
Add Snapshot and PVC to PVC cloning test cases
to rbd and cephfs upgrade testing.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-09-22 07:25:00 +00:00
Niels de Vos
e353d406eb ci: pass major k8s version to jobs, detect patch release
Jobs can now pass the wanted Kubernetes major version (like '1.19') to
the Jenkins Pipeline scripts. The Pipelines detect the most recent patch
release for the major version with the new get_patch_release.py script.

This causes the CI Job status context to not have the patch number (last
digit of the release) included anymore. Restarting a test will only need
the major version number, as does updating the Mergify configuration.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-09-15 17:02:04 +05:30
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
Madhu Rajanna
8fd212a797 ci: update kubernetes version for e2e job
removed 1.17 as we are testing only two versions
in centos CI. as v1.19 is released, we will be
testing v1.18 and v1.19 in CI.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-09-09 14:02:45 +00:00
Niels de Vos
199f5e7551 ci: skip mini-e2e-helm jobs if PR has the 'ci/skip/e2e' label
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-24 08:51:46 +00:00
Niels de Vos
8806d8e69b ci: skip mini-e2e jobs if PR has the 'ci/skip/e2e' label
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-24 08:51:46 +00:00
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
Madhu Rajanna
5db63ceacd ci: error out for invalid component in commit header
if the commit header is not present in the list of
the component we maintain. the commitlint check should
show error instead of showing the warning.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 52243d0140)
2020-08-19 11:15:09 +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
46d0ae5495 ci: prepare.sh should accept --history without argument
The --history does not take an argument, similar to --help. Move it out
of ARGUMENT_LIST so 'getopt' does not complain about it.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 15:00:17 +02:00
Niels de Vos
64588e2b1c ci: use FETCH_HEAD like "commitlint --from" does
After fetching the target branch for the PR, the GIT_SINCE ref in the
git repository may not be set (in CI environments). This causes 'git
rebase' to fail. Use FETCH_HEAD instead, so that the checked out PR gets
rebased correctly.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 11:54:23 +00:00
Niels de Vos
6fc3706fab ci: fetch full history when cloning for commitlint job
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 11:54:23 +00:00
Niels de Vos
e9aec13761 ci: add --history option to prepare.sh
In case the history of the branch is needed (commitlint job), add an
option --history to skip cloning the repository with --depth=1.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 11:54:23 +00:00
Niels de Vos
56d545c2e2 ci: pass REBASE=1 while running commitlint job
By passing REBASE=1 to the commitlint make target, the current checked
out PR will be rebased on top of the parent branch. This should result
in a linear history that commitlint can parse correctly.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 09:05:41 +00:00
Niels de Vos
ffb4634ba5 ci: pass REBASE=1 to have commitlint rebase the branch
When Mergify adds a merge commit to the branch that is being tested with
commitlint, the tool tries to detect the most recent changes based on
the newly merged commit. This is for most PRs the master branch, and
that contains incorrect commit messages in the history. Because of this,
commitlint will fail.

By adding an option (REBASE=1) to the commitlint make target, CI jobs
can request a rebase so that the history of the PR becomes linear again
and commitlint should be able to detect only the new commits.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-18 09:05:41 +00:00
Yug
e106eed235 ci: Increase timout for mini-e2e-helm job
Increase timeout to provide sufficient time
for tests to execute.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-18 06:32:52 +00:00
Yug
79adaef3d1 ci: Increase timeout for mini-e2e job
Due to a strict timeout, the job
tends to abort sometimes. Increasing the
timeout to allow sufficient time for
tests to execute.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-18 06:32:52 +00:00
Niels de Vos
5830a2f1bf ci: use GitHub Hooks to trigger jobs
By using GitHub Hooks, jobs get triggers quickers. It also may prevent
the occasional hickup in the Jenkins GitHub-Pull-Request-Builder while
polling events for the cron-jobs.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-17 09:45:07 +00:00
Niels de Vos
108628039e rebase: use Rook v1.3.9 for mini-e2e jobs
Rook v1.3.9 was released yesterday, so we can consume it for our CI jobs
now.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-17 03:44:37 +00:00
Niels de Vos
ca6d88b3b7 ci: use build.env:CSI_IMAGE_VERSION for mini-e2e jobs
By placing CSI_IMAGE_VERSION=v3.1.0 in build.env in the release-v3.1
branch, the CI jobs using single-node-k8s.sh can pickup the version
dynamically.

Other release branches can do the same, and the CI jobs will not need
modifications for each release.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-13 13:40:41 +00:00
Niels de Vos
12c0d07184 ci: the ci-job-validation script uses an undefined variable
It seems ci-job-validation.groovy got merged with a mistake. The
git_repo variable is used, but was not defined.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-13 18:56:41 +05:30
Niels de Vos
209b31c83a ci: use last "git fetch" output to test commitlint
When running in the CI the git repository is not completely cloned. This
causes the 'commitlint' job to be unable to resolve the history of the
commits.

By using FETCH_HEAD, the last 'git fetch' output will be used.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-12 16:04:26 +00:00
Niels de Vos
0e19f37f61 ci: skip mini-e2e for doc-only PRs
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-12 16:04:26 +00:00
Niels de Vos
44d6b17aa7 ci: skip mini-e2e-helm for doc-only PRs
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-12 16:04:26 +00:00
Niels de Vos
4d13504211 ci: skip ci-job-validation for doc-only PRs
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-12 16:04:26 +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
648c3f7f77 ci: allow everyone to run the "commitlint" job
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-10 13:04:23 +00:00
Niels de Vos
fdb17ace76 ci: make members of the GitHub "ceph" organization admins
Not everyone can restart CI jobs, only members of the Ceph organization
in GitHub. All jibs (except "commitlint") are started automatically, so
there is no functional change.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-10 12:02:13 +00:00
Niels de Vos
f7c6b2bb72 ci: always fetch GIT_SINCE for commitlint
When running the commitlint CI job, the branch that the PR is based on
may not be available. That makes it impossible for commitlint to detect
the changes between the HEAD of the branch, and the commits in the PR.

By fetching GIT_SINCE unconditionally, commitlint should be able to
detect the changes and only run the tests against the commits that were
added through the PR.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-10 09:57:06 +00:00
Niels de Vos
65a0e5c40b ci: do not run commitlint for admin user/group
commitlint should not run automatically on PRs, regardless who posted
the PR. Everyone should be able to trigger a run of the job with `/test
commitlint` anyway.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-07 14:15:51 +00:00
Niels de Vos
2e2f69e04a ci: run commitlint when requested, not containeriized-tests
The jobs/commitlint.yaml refered to the containerized-test.groovy
script, not the commitlint.groovy script.

Make sure to run the righ job when requested. Add some comments to make
things a little clearer.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-07 14:15:51 +00:00
Niels de Vos
120bbc66ab ci: add commitlint fallback job
Each PR gets tested by the commitlint app (which is deprecated). On
occasion the app does not pickup the change in a PR, and the only way to
start a retest is to re-push the PR. All tests will then get executed
again, even if only commitlint was needed.

The new commitlint CI job introduces '/retest commitlint' and runs in
the CentOS CI like other Jenkins jobs. However, the job does not start
automatically on each (updated) PR, but needs manual starting with the
'/test commitlint' or '/retest commitlint' comments. The normal way of
running commitlint is with the app (at least for now).

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-07 12:52:05 +00:00
Niels de Vos
c0943efc64 ci: pass strings with quotes over ssh in mini-e2e-helm
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-05 12:32:32 +00:00
Niels de Vos
a44bb6fd98 ci: create test namespace before "helm install ceph-csi"
Without the namespace, Helm fails to install Ceph-CSI.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-05 10:24:56 +00:00
Madhu Rajanna
78976616ac ci: add single quotes for namespace var
added single quotes for namespace variable

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-05 09:41:47 +00:00
Madhu Rajanna
1978e9a9f1 ci: fix namespace variable
define a new variable with def for namespace

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-05 09:41:47 +00:00
Niels de Vos
d6b0fc37f1 ci: add missing " in mini-e2e-helm script
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-05 07:52:33 +00:00
Niels de Vos
020d3eb212 ci: add mini-e2e-helm Jenkins job
The mini-e2e-helm.groovy script is mostly a copy of mini-e2e.groovy that
does the deployment through the e2e.test executable. The new script
installs Helm and deploys Ceph-CSI through that.

Once the e2e tests have successfully finished, the deployment of
Ceph-CSI is removed again.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-05 05:36:49 +00:00
Niels de Vos
3d7784f75b ci: give minikube 8GB RAM on CentOS bare-metal systems
All bare-metal systems in the CentOS CI have 16GB or more RAM. To
improve performance of the minikube VM, give is 8GB RAM.

See-also: https://wiki.centos.org/QaWiki/PubHardware
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-04 07:19:39 +00:00
Yug
4f4513fa0a ci: Correct the stage name
Curently the stage name directly
prints the name of the variable
in place of substituting it.
This is a fix for that issue.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-04 04:02:18 +00:00
Yug
a71785d0f2 ci: use double quotes for variables
Using double quotes as variables are
expanded inside them.
The script fails currently as it is
unable to expand the variables.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-08-03 17:42:15 +00:00
Niels de Vos
0f811e9735 ci: jjb-deploy should have a "deployment" stage
The stage is called "validate" at the moment, this is a copy/paste
mistake from the jjb-validate job.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 15:36:47 +00:00
Niels de Vos
86448395a5 ci: job name should not contain a "/"
The "/" in the name may have a conflict with the existing "mini-e2e" job
name. Rename the new generated jobs to "mini-e2e_k8s-1.x.y", with a "_"
instead of "/".

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 16:58:15 +02:00
Niels de Vos
322698a313 ci: pass ghprbPullId as parameter to jjb-validate job
Currently the jjb-validate job always checks out the ci/centos branch,
not the contents of the PR. This makes testing PRs unreliable.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 16:50:14 +02:00
Niels de Vos
1fb77b0626 ci: correctly indent parameters for mini-e2e job
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 16:50:14 +02:00
Niels de Vos
1de6b0bba2 ci: pass Kubernetes version as parameter to mini-e2e job
Move the mini-e2e job into a template-job and generate two jobs out of
it: mini-e2e/k8s-1.17.8 and mini-e2e/k8s-1.18.5

By passing the k8s_version as variable to the job-template, and placing
it in the parameters for the mini-e2e.groovy script, all hard-coded
occurences of the Kubernetes version can be replaced by the
{k8s_version} placeholder.

See-also: https://jenkins-job-builder.readthedocs.io/en/latest/definition.html#job-template
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 14:12:25 +00:00
Niels de Vos
8fbeefa989 ci: use ceph-csi:ci/centos for fetching job scripts
Commit f5cba3aaa8 added the mini-e2e job, but still referred to the
temporary location that was used for testing the job. As everything is
available in the ceph-csi:ci/centos repository:branch, there is no need
to refer to the temporary location.

Reported-by: Yug <yuggupta27@gmail.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 11:22:13 +00:00