Commit Graph

96 Commits

Author SHA1 Message Date
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
Niels de Vos
d8f098fb47 ci: disable debug sleep on failure of mini-e2e
While debugging issues with the job itself, a sleep has been very
useful. PRs that have been rebased on the master branch contain all the
deployment fixes that are needed for the job to pass. There is no need
anymore to run into the long sleep when the job fails.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 10:32:11 +00:00
Niels de Vos
96dcc08223 ci: use ci/centos/mini-e2e/k8s-1.18 as context for mini-e2e job
Restarting the CI job can now be done with the following comments in a
PR:
- /test all
- /retest all
- /test ci/centos/mini-e2e
- /retest ci/centos/mini-e2e
- /test ci/centos/mini-e2e/k8s-1.18
- /retest ci/centos/mini-e2e/k8s-1.18

This is added as preparation for enabling running the mini-e2e job with
different Kubernetes versions.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 10:13:46 +00:00
Niels de Vos
1b43d5ab11 ci: use rook-1.3.8 in single-node-k8s.sh
The CentOS CI jobs that use single-node-k8s.sh will run minikube with
additional disks. That makes it possible for Rook 1.3 and newer to
deploy the Ceph cluster.

The current Travis CI jobs run minikube on the Travis provided
environment, without any extra disks. This prevents updating Rook for
all CI jobs at the moment.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 08:11:17 +00:00
Niels de Vos
f5cba3aaa8 ci: add mini-e2e Jenkins job
The new mini-e2e jobs does the following:
 - reserve a bare-metal machine
 - checkout the git repository with the PR
 - build used artifacts (container image and e2e.test executable)
 - deploy k8s and Rook in a minikube VM
 - run the e2e tests

With-contributions-from: Yug <yuggupta27@gmail.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 08:11:17 +00:00
Niels de Vos
d6ab44fdfa ci: use dnf on CentOS-8 systems
All bare-metal hosts that get reserved for tests are CentOS-8, so use
dnf.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-03 08:11:17 +00:00
Madhu Rajanna
7d9ef78057 ci: install make in centos ci
in centos 8 make doesnot come as
default we need to install it.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2020-08-03 06:27:14 +00:00
Niels de Vos
954b2f42ea ci: request CentOS-8 bare-metal machines
Currently CentOS-7 machines were requested. CentOS-8 has been out for a
while now, and is stable for running manual jobs. There is nothing
preventing us from using CentOS-8 bare-metal machines for testing.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-08-01 11:24:35 +05:30
Niels de Vos
9db5d82327 ci: OCP4 deletes pods from batch jobs automatically
On the new OCP4 cluster, deleting the batch job results in deletion of
the pod as well. Deleting the pod when it does not exist anymore results
in a failure. Ignoring the potential failure makes the job pass again.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-24 14:11:42 +00:00
Niels de Vos
db0313a26b ci: update links to new OCP4 deployment
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-24 14:11:42 +00:00
Niels de Vos
f04e8738f0 ci: use new OCP4 registry for jjb image
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-07-24 14:11:42 +00:00