Commit graph

68 commits

Author SHA1 Message Date
Ondřej Budai
b34571c1ec github: fetch more PRs when triggering gitlab
By default, the API will fetch only 30 open PRs. This is enough currently
as we have 35 open ones. Bump the limit to the maximum. 100 should be enough
for some time. 🤞

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-02-16 11:01:43 +01:00
Ondřej Budai
11893485cd github: split checks into 3 jobs
To speed it up a bit.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-02-16 10:00:25 +01:00
Ondřej Budai
5e639cba6f github: adapt the github trigger to work the same way as in osbuild
I basically just copied
7c9944ee18/.github/workflows/trigger-gitlab.yml

and:
- changed osbuild to osbuild-composer
- add a SKIP_CI mechanism

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-02-10 16:16:30 +01:00
Ondřej Budai
f66740fdbd github: fix gitlab trigger
With the quoting, we are passing an empty variable instead of no argument.
Also, if the skip is required, we are passing "-o ci.skip" instead of
"-o" "ci.skip".

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-02-08 10:03:59 +01:00
Roy Golan
e8dd3654d5 Allow skipping CI for draft PR or WIP label
Save resources and needless CI runs by skipping the trigger-gitlab job if a PR is 'draft' (can be set in the pull request page at any time) or by setting a label "WIP".

Asside from saving resources, WIP PRs that don't trigger CI are a good message to a contributers to keep testing it locally and to only get the project resources after serious testing been made on their side.
2022-02-08 08:24:23 +01:00
Ondřej Budai
b667df4443 bump the minimum Go version to 1.16
Fedora 34 ships 1.16
RHEL 8.5 also ships 1.16

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-01-12 11:35:06 +01:00
dependabot[bot]
818e1bd040 build(deps): bump actions/setup-go from 2.1.4 to 2.1.5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2.1.4 to 2.1.5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2.1.4...v2.1.5)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-03 09:04:03 +01:00
dependabot[bot]
87bbe51e03 build(deps): bump actions/checkout from 2.3.4 to 2.4.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 2.3.4 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2.3.4...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-22 13:56:15 +01:00
sanne
f284e2a932 .github: Bump fedora container version for rpmlint 2021-12-17 13:13:05 +01:00
Simon Steinbeiss
d41ae15220 release-action: Send notification to our Slack channel
Passing the webhook URL is necessary because GH composite actions don't
support handling secrets.
See also https://github.com/osbuild/release-action/pull/3

[skip ci]
2021-12-13 09:48:34 +01:00
Alexander Todorov
1547451ee1 ci: Install gssapi/gssapi.h for Coverity Scan 2021-12-02 11:31:41 +01:00
Alexander Todorov
efcd959d2e ci: Update Coverity Scan name
curl will URL encode this properly, no need to be encoded first
2021-11-18 10:26:52 +01:00
Alexander Todorov
87b4a95e09 ci: Send results to Coverity Scan daily
https://scan.coverity.com/projects/osbuild-osbuild-composer
2021-11-12 14:20:15 +01:00
Simon Steinbeiss
bb15007f35 Let schutzbot do the post-release version bump
We need a privileged / admin user doing the post-release version bump as
this is a direct commit to main (i.e. without a PR) so switch to using
schutzbot with a scoped personal access token (only public_repo).
2021-11-01 20:27:36 +01:00
Simon Steinbeiss
dcb5220329 Switch to simple upstream releases
This commit changes our release process from the model of having a
release commit (and pull request) which also updated the NEWS.md file
and bumped the versions in the osbuild.spec and setup.py files to simply
pushing a tag.

After the tag (containing the release notes) is pushed, a GitHub
composite action is triggered that creates a GitHub release with the
contents of the git release tag. Furthermore the bumping of the version
number now always has to happen directly after a release to avoid having
to push a(n untested) commit to main for the release and this is also
handled by the GitHub composite action.

Finally packit pushes directly to dist-git now on pushing the release
tag, so no pull-request needs to be reviewed and merged anymore.

Consequently, we also drop the docs/news folder and its content and
adjust the PR template.
2021-10-27 13:03:53 +02:00
dependabot[bot]
ea19341897 build(deps): bump actions/setup-go from 1 to 2.1.4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 1 to 2.1.4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v1...v2.1.4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-04 12:13:36 +02:00
Juan Abia
d7bdd0efba schedule depandabot checks
schedule checks so they happen at 4:00am UTC. This way gitlab CI doesn't get
blocked during working hours.
2021-09-03 15:32:36 +02:00
Alexander Todorov
24727bb2e3 Disable automatic rebase for Dependabot 2021-09-03 08:27:01 +02:00
dependabot[bot]
96e79162fb build(deps): bump ludeeus/action-shellcheck from 0.5.0 to 1.1.0
Bumps [ludeeus/action-shellcheck](https://github.com/ludeeus/action-shellcheck) from 0.5.0 to 1.1.0.
- [Release notes](https://github.com/ludeeus/action-shellcheck/releases)
- [Commits](https://github.com/ludeeus/action-shellcheck/compare/0.5.0...1.1.0)

---
updated-dependencies:
- dependency-name: ludeeus/action-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 14:58:01 +02:00
Ondřej Budai
97d6142609 ci: do not trigger gitlab CI on pushed to upstream branches
Dependabot pushes branches directly to the upstream repository. This causes
double-triggers of gitlab CI. Prevent it by running gitlab CI only for
the main branch.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-09-01 10:04:45 +02:00
Alexander Todorov
b777444319 Update Dependabot config
- limit the number of open PRs
- check for actions updates less often b/c this is less critical
2021-08-27 14:07:48 +02:00
Alexander Todorov
01f2e02a1b Whitelist Dependabot
it looks to me that the permission action will work only for regular
accounts, not bots.
2021-08-27 14:07:48 +02:00
jabia99
6abb4b9af6
added dependabot configuration file (#1672)
dependabot is an independent security scanning tool which mostly
focuses on evaluating the dependency chain. Having the dependabot.yml
file on the main branch would enable the bot to test the dependencies
daily.
2021-08-26 09:41:54 +02:00
Ondřej Budai
78ef247042 bump minimum go version to 1.15
The oldest distributions that we now support are RHEL 8.4 and Fedora 33.
They both support go 1.15, let's bump.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-07-07 17:26:18 +01:00
Alexander Todorov
591b0fa1be Disable Shutzbot in favor of GitLab CI 2021-05-31 11:44:37 +02:00
msehnout
4ab3dadb47 github: create issue template
Create a template to help us with the bug reporting process. This template includes a request for information we usually ask from the reporters. This way, they can include the information upfront.
2021-05-24 12:04:36 +03:00
Tomas Hozza
4c5d4de387 rpmmd: separate loading of repo definitions from file and add tests
Separate the loading of repo definitions from JSON file from
`LoadRepositories()` to a standalone function
`loadRepositoriesFromFile()`, to make it easy to reuse it in the future.

Add unit tests for `LoadRepositories()` function.

Exclude github.com/osbuild/osbuild-composer/internal/rpmmd/test package
from test coverage. Package with just tests and no other code makes `go
test` to fail. This should be fixed in go 1.17.
See https://github.com/golang/go/issues/27333

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-05-14 15:43:00 +02:00
Ondřej Budai
260fdb053f ci: add GitLab CI
This commit adds an experimental GitLab-based CI. See the PR for more
information.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-04-14 09:18:06 +02:00
Martin Sehnoutka
6ed4c59010 github: mention the guides in the pull request template
The template mentioned only "adequate" documentation which can be
interpreted in many ways. Mention the news/unreleased directory and the
guides explicitly and include links for convenience.
2021-04-02 14:13:40 +02:00
Ondřej Budai
18af1f5b78 github: run workflows on PR head commit
By default, the checkout action checkouts the merge commit. This is different
from what Schutzbot currently does - it runs the test on the PR HEAD commit.
Let's change the GitHub workflows behaviour to the same one as Schutzi
uses.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-03-17 00:15:13 +00:00
Ondřej Budai
ab773975ea ci: do not run the unit tests with verbose on
When unit tests succeed, no one cares about them.

When unit tests fail, it's hard to find which one failed. This commit removes
the verbose flag, so it's easy to spot what failed.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-02-13 18:33:09 +00:00
Major Hayden
538f64eb67 Send webhooks without credentials
We can now send webhook data to an SQS queue at AWS without signing the
request with credentials. This allows us to trigger Schutzbot from
forks and from branches on the main repository.

Signed-off-by: Major Hayden <major@redhat.com>
2021-02-10 18:31:56 +00:00
Major Hayden
51aa1c771c Trigger schutzbot using github actions
Signed-off-by: Major Hayden <major@redhat.com>
2021-02-10 08:38:42 +01:00
Ondřej Budai
f2318f8c5f go: bump to 1.14
The oldest distros we support are Fedora 32 and RHEL 8.3. As both have
Go 1.14, we're safe to upgrade.

Also, I had to change prepare-source.sh because go fmt now refuses to run on
a project which has issues in go.mod, go.sum or modules.text. I think this
should be a harmless change.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-02-01 15:32:58 +01:00
Lars Karlitski
985def36f3 .github: add checklist to PR template 2021-01-15 13:21:12 +01:00
Lars Karlitski
7a5790d6b7 .github: move text in the PR template into a comment
The majority of pull requests do not fix a downstream issue. In
practice, people usually delete the whole suggested content.

Move it into a comment, so that this step is unnecessary.
2021-01-15 13:21:12 +01:00
Ondřej Budai
e8ae7e7cae .github: switch to ubuntu-20.04
As the team obsessed with immutable test dependencies, how could we use
the ubuntu-latest VM which can change at any time?

Speaking of changes to ubuntu-latest... It will soon be updated from ubuntu
18.04 to 20.04 [1].

This commit switches our testing pipeline to use ubuntu-20.04 to:

1) make our test dependencies immutable (or at least slightly more immutable)
2) make us prepared for the ubuntu-latest changes.

[1]: https://github.com/actions/virtual-environments/issues/1816

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2020-11-19 11:58:56 +01:00
Lars Karlitski
f3b56cc305 master → main 2020-11-13 14:09:01 +01:00
Ondřej Budai
3bcce32c9b .github: add rpmlint
rpmlint errors are usually not a big deal but it's always nice when we can
catch them early. This commit introduces a new Github workflow that builds
an SRPM and runs rpmlint against it.
2020-11-12 12:57:53 +01:00
Ondřej Budai
073f9dc79a test/koji: move the koji test to schutzbot
The Koji test in Github actions was always a bit quick and dirty solution.
I think it's much nicer solution to run it on Schutzbot.

Therefore, this commit moves the koji_test.go to a new osbuild-koji-tests
executable. This new test isn't run in the base test suite as one would
anticipate but inside the koji.sh test. This is needed because
osbuild-koji-tests requires a running koji instance. This might change
in the future but I think it works for now.
2020-11-02 19:59:28 +01:00
Alexander Todorov
d5a22097b8 tests: Add notes for downstream testing
also includes PR template to make this more visible to
everyone!
2020-10-15 19:01:47 +01:00
Tom Gundersen
555934e303 koji: move run-koji-containers.sh to tools
Also install it is part of he tests subpackage. This a helper-tool, not
golang code, so should not live in `internal`. We need access to this
from the integration tests, so install it onto the tests system.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-10-06 13:08:26 +02:00
Martin Sehnoutka
369d5d3e4d GH workflow: introduce shellcheck job
This job uses shellcheck to analyze all our bash scripts except for
those in /vendor directory.

It also allows sourcing /etc/os-release without checking it, because
it doesn't make any sense to check that the CI machine has correct
/etc/os-release file. Also allow useless cats because I don't think they
cause any harm.
2020-09-19 15:10:39 +02:00
Tom Gundersen
4f39a33d34 osbuild-composer-koji.socket: use standard https port
Rather than using the arbitrary port 8701, use the standard 443. The
worker API will remain on a separate port, and as long as the two APIs
are exposed by the same binary that will have to remain separate at
8700.

Move the test instance of koji on localhost from 443 to 4343, to avoid a
conflict.

In a follow-up we should also give this API a prefix, so the cloud API
can share the same port with it.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2020-09-17 17:34:57 +02:00
Tom Gundersen
e52830f530 upload/koji: don't pass task_id to cg_init_build
Contrary to our assumption, we cannot initialize the build with the
link to the task. We can only update the link once the build has
completed.

This seems like a bug in koji, but we keep it like this for now.
2020-09-16 00:15:02 +01:00
Ondřej Budai
05fd221bd4 upload/koji: add support for GSSAPI/Kerberos auth
Prior this commit we only had support for username/password authentication
in the koji integration. This wasn't particularly useful because this
auth type isn't used in any production instance.

This commit adds the support for GSSAPI/Kerberos authentication.
The implementation uses kerby library which is very lightweight wrapper
around C gssapi library.

Also, the koji unit test and the run-koji-container script were modified
so the GSSAPI auth is fully tested.
2020-08-27 17:29:57 +01:00
Ondřej Budai
a6b33e394b ci/koji: use the same container setup as for local testing
Services in Github Actions are cool but have some drawbacks:
1) We want to be able to use the container setup locally, therefore there's
   run-koji-container script which does exactly the same setup as it's defined
   in Github Actions. We don't want duplicities though.

2) In the near future, we will need more complicated setup - generating
   certificates before a container is started. This is not possible with
   the current Github Actions capabilities.

This commit removes the container setup from Github Actions and just reuses
the run-koji-container script in the GH Actions environment. This way we
have only one setup which is also more flexible.
2020-08-27 17:29:57 +01:00
Ondřej Budai
b525cee26e ci: bump golangci-lint version 2020-08-25 10:42:54 +02:00
Ondřej Budai
5e6e77b565 bump minimal Go version to 1.13
All our downstream platforms now support Go 1.13:

RHEL 8.2: golang-1.13.4
Fedora 31: golang-1.13.14

There's no reason anymore to stay on 1.12, therefore this commit bumps
the minimal required Go version to 1.13
2020-08-25 10:42:21 +02:00
Major Hayden
01c8daabf7 ⏱ Extend golangci-lint timeout to 5m0s
For reasons unknown, golangci-lint's default 1m0s timeout is *slightly*
too short for CI runs occasionally. Extend it to 5 minutes to ensure the
job always has enough time to run.

Signed-off-by: Major Hayden <major@redhat.com>
2020-08-24 12:21:38 -05:00