Age | Commit message (Collapse) | Author | Files | Lines |
|
It's a bit massive diff, but why isn't the project enforcing formatting?
It makes working with editors and tools much easier then.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
|
|
The upstream for 'cirrus-run' didn't yet accept our patches. Rather than
pulling from a private repo we now have a fork of upstream containing
our patches. Update to pull from it.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
Recently the libvirt project started to run out of CI credits on cirrus
towards the end of the month. As this is annoying we'd prefer if the job
is allowed to fail in such case.
This patch (temporarily) switches to 'cirrus-run' version with patches
allowing detection of CI credit failure, which also returns a different
error code allowing us to allow return code '3' to be considered an
allowed failure.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
When the go-fmt job was changed to use Alpine, it was seemingly
missed that the diffstat command isn't available by default.
Instead of depending on an external package, however, we can
just let git generate a diffstat if we change the way the job
works slightly.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
The gitlab CI config file has to pass various variables into the cirrus
CI config file to control the build process. This is done by a giant sed
command in the cirrus build template. This is inflexible since the set
of substitutions is hardcoded.
This new 'cirrus-vars' command can replace any variable @NAME@ with the
corresponding value from the $NAME environment variable.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
After a container is done installing necessary packages, the list
of all installed packages is collected into packages.txt file
which is then printed out. And this works everywhere but Alpine.
Because there 'apk list' is run which prints ALL available
packages. We need to pass '--installed' to limit listing only to
the installed ones [1].
1: https://man.archlinux.org/man/apk-list.8.en
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
|
|
Historically we use the CI_COMMIT_REF_SLUG for the docker tag, which is
the branch name. This meant that when testing container builds from
non-default tags/branches we didn't pollute the primary published
content.
When we switched to use merge requests for triggering CI in:
commit 7a7402d259db6e75b2a6fbb1523b42a2d18fabfa
Author: Daniel P. Berrangé <berrange@redhat.com>
Date: Thu Feb 10 17:43:56 2022 +0000
gitlab: switch to trigger jobs against the merge request by default
we stopped publishing containers for anything except a push to the
default branch. As such there's no reason to use CI_COMMIT_REF_SLUG,
we can just use a fixed tag name.
The docker default is to use ':latest', so adopt that instead of
':master'.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
The 'flake8' tool provides opinionated code style checks of
python code. This adds a minimal container for running 'flake8'
as a CI job.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
The 'black' tool provides opinionated formatting of python code.
This adds a minimal container for running 'black' as a CI job.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
The previous commit to dynamically detect the default branch
name (instead of assuming 'master') only worked if the fork
repo used the same default branch name as upstream. This is
only likely to be the case for forks created after the
upstream branch rename, and even then developers might change
their fork's default branch name.
Fortunately 'git remote show' prints info including the
default branch name:
$ git remote show check-dco
* remote check-dco
Fetch URL: https://gitlab.com/libosinfo/osinfo-db.git
Push URL: https://gitlab.com/libosinfo/osinfo-db.git
HEAD branch: main
Remote branch:
main new (next fetch will store in remotes/check-dco)
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
While CI jobs run in a throwaway git repo checkout, developers testing
this script do not and so benefit from cleanup on failure.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Use 'CI_DEFAULT_BRANCH' to identify the branch in case the project
has switched to using 'main' as the branch name.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
To match what 'lcitool manifest' would generate. This highlights
the fact that the job can be kicked off immediately, without
waiting for builds to complete.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
The functionality was wired up, but the actual implementation
was missing.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
Reverts: 40edc2e88a49173288bbd1a9e1237d27358a884c
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
Turns out that this is not really usable in its current form.
First of all, running clippy requires building the project, and
so having a separate job for it running in a fresh container
means that you're wasting a lot of CPU cycles.
More importantly, projects like libvirt-rust need a number of
extra packages such as the native library, pkg-config, libclang
and so on to be available in addition to the Rust compiler and
clippy, which makes providing a one-size-fits-all container
pretty much impossible.
Reverts: 22b83c9516047fd2fa6f640d928efc3348799916
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
That's where clippy actually produces most of its interesting
output.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
This complements the existing cargo-fmt job.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
To match what 'lcitool manifest' would generate. This highlights
the fact that the job can be kicked off immediately, without
waiting for builds to complete.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
The output produced by the tool is not actually in patch
format, so the file extension is inaccurate and calling
diffstat on it doesn't make sense either.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
This contains updates for the API breakage in Cirrus CI
https://github.com/sio/cirrus-run/issues/9
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
The version 0.4.0 included several fixes to cope with intermittant
API errors and improve retries and logging, and 0.5.0 included
retries for internal server errors.
This ought to improve reliability of Cirrus CI jobs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
When the check-dco script is triggered from a merge request pipeline,
rather than a branch push pipeline, there might be a merge commit
present. This will not have a SoB line present and thus will fail
the DCO check, despite all the real commits having valid SoB.
We cannot just check all commits from the ancestor. We need to use
the explicit ancestor and head from the merge request, which will
exclude the merge commit.
This also has the benefit that we no longer need to add an extra
remote for the upstream repository in the merge request scenario,
since we are no longer trying to guess the common ancestor.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
The current docker:dind container has broken default seccomp filter that
results in clone3 being blocked, which in turn breaks Fedora 35 rawhide.
This creates a thin shim that provides a custom seccomp profile that is
simply a copy of the default docker profile from
https://raw.githubusercontent.com/docker/labs/master/security/seccomp/seccomp-profiles/default.json
Although this profile doesn't list clone3, it somehow results in clone3
getting configured for ENOSYS instead of EPERM, which makes everything
work again.
Individual projects can then use this new wrapper image by applying the
diff
services:
- - docker:dind
+ - name: registry.gitlab.com/libvirt/libvirt-ci/docker-dind:master
+ alias: docker
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Alpine is a much smaller image and for the sake of consistency we can
pull <language>:<major>.<minor>-alpine for all of our sanity checker
scripts.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
|
|
Even with correct formatting we end up with a non-empty patch file
thanks to the verbose mode which we're actually not interested in
anyway.
Signed-off-by: Erik Skultety <eskultet@redhat.com>
|
|
Now that 0.3.0 has been released and uploaded to PyPi, we no
longer need to install from git to get all the features we want.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
This is consistent with the rest of the code in the repository.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
This cuts down on the amount of boilerplate while conveying the
exact same amount of information.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
As long as we keep building cirrus-run from git to help the upstream
author validate his changes, we better use specific commits to
maintain reproducibility between forks and also as a way to trigger
a container rebuild.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
This is a temporary measure to help validate some recent changes
in cirrus-run. Once a new release is made, we'll switch back to
installing from PyPi.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
This tool can be used to trigger Cirrus CI jobs from outside of
Cirrus CI itself, and we're going to use it to add FreeBSD and
macOS support to our GitLab CI configurations by delegating them.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
|
|
The "cargo fmt" code style checking tool is something we wish to run on all
Rust code, so it is useful to have a common container that can be used by
all relevant projects.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
The "go fmt" code style checking tool is something we wish to run on all
Go code, so it is useful to have a common container that can be used by
all relevant projects.
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
This will allow us to reuse the same container image to perform
DCO checking for libosinfo repositories.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Make it match the name of the script.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
It refers to an old name for the script.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
Let's keep the repository structure tidy.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|