Commit Graph

14 Commits

Author SHA1 Message Date
Niels de Vos
c90023ad5d ci: add the root user to the libvirt group
When starting a minikube VM, there are always warning messages like
this:

    X libvirt group membership check failed:
    user is not a member of the appropriate libvirt group

The CI jobs run as root, so minikube works just fine. By adding the root
user to the libvirt group, the warning is hopefully removed.

Note that the libvirt group may not exist yet, as the packages will get
installed in a later stage. This change also adds a check to create the
libvirt group in case it is missing.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-07-16 09:59:45 +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
Yug
86b80a23a5 ci: Fix shellcheck warnings for prepare.sh
Shellcheck suggests use of doube quotes to prevent
word splitting, hence adding the same.

Signed-off-by: Yug <yuggupta27@gmail.com>
2020-10-27 13:30:42 +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
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
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
6e3c1dadae ci: add --base=<branch> to checkout a base branch
When checking out a PR for a non-master branch, `git clone` should
download the last commit of the branch. Adding a `--base=..` option to
pass the cloning of a selected branch, instead of `master`.

We also want to fetch all commits in the PR, so they can get tested with
`commitlint`. Only fetch --depth=1 the initial clone, but fetch
everything in the PR itself.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-05-27 12:52:21 +02:00
Niels de Vos
fe738e9d9f cleanup: remove trailing spaces in prepare.sh
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-05-27 12:52:21 +02:00
Niels de Vos
f436143be1 ci: address ShellCheck issues in prepare.sh
In ./prepare.sh line 21:
if [ $? -ne 0 ]
     ^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

In ./prepare.sh line 28:
eval set -- ${opts}
            ^-----^ SC2086: Double quote to prevent globbing and word splitting.

In ./prepare.sh line 55:
        echo ${ref}
             ^----^ SC2086: Double quote to prevent globbing and word splitting.

In ./prepare.sh line 69:
git clone --depth=1 ${gitrepo} ${workdir}
                    ^--------^ SC2086: Double quote to prevent globbing and word splitting.
                               ^--------^ SC2086: Double quote to prevent globbing and word splitting.

In ./prepare.sh line 70:
cd ${workdir}
^-----------^ SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
   ^--------^ SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-05-27 12:52:21 +02:00
Niels de Vos
5ce5eb5be6 ci: make prepare.sh use /bin/bash
There are a few non-POSIX shell extensions used. So use Bash to run the
script.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-05-27 12:52:21 +02:00
Yug Gupta
917ec1e2f1 prepare: exit when passed incorrect parameters
Now script does not continue execution
when an invalid argument is passed.

Signed-off-by: Yug Gupta <ygupta@redhat.com>
2020-05-07 10:31:57 +02:00
Yug Gupta
34b07b8ad9 Update Prepare.sh in centos CI branch
The script accepts three command-line arguments:

reference to the latest pr [optional]
working directory	   [optional]
git repository	           [optional]

Sample usage:
./prepare.sh --gitrepo=https://github.com/example --workdir=opt/build --ref=pull/123/head

Fixes: #968

Signed-off-by: Yug Gupta <ygupta@redhat.com>
2020-05-06 13:34:01 +05:30
Niels de Vos
538cdcdba4 add make-containerized-build job
The job does not have any parameters yet, it only build for the master
branch.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-04-01 14:15:04 +02:00