Commit graph

102 commits

Author SHA1 Message Date
Achilleas Koutsou
1cc90c6a0b go.mod: update to go v1.21
Go 1.21 is included in all currently supported distro versions.
It is required by new updates to some of our dependencies, including
osbuild/images.
2024-07-04 19:01:07 +02:00
Florian Schüller
c36367d4cc makefile: implement make lint 2024-07-04 17:52:44 +02:00
dependabot[bot]
7ce03144da build(deps): bump golangci/golangci-lint-action from 5 to 6
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 5 to 6.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-13 15:44:16 +02:00
Tomáš Hozza
fa416e4545 Test: re-enable snapshot URL check (COMPOSER-2263)
Enumerating snapshots now works after the cleanup of EOL releases.

Fixes https://issues.redhat.com/browse/COMPOSER-2263

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 17:17:19 +02:00
Tomáš Hozza
4267c28ffb Tests: temporarily disable checking of valid snapshot URLs
rpmrepo snapshot enumeration is timing out, which is effectively
blocking GitLab CI from running. Disable the check for now to unblock
CI.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
8f36b6f26e Explicitly pass rpmlint config when calling it
New version of rpmlint stopped picking the config automatically.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-05-30 19:58:34 +02:00
Tomáš Hozza
666baff944 Update F37 to F40
Fedora 37 has been EOL for some time.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-05-30 19:58:34 +02:00
Alexander Todorov
8dece19342 Submit data to CodeCov only if actor has access to token secrets 2024-05-10 22:08:27 +03:00
Alexander Todorov
966685607b Re-enable codecov but use a GHA to submit the results
because the bash upload has been deprecated
2024-05-10 22:08:27 +03:00
dependabot[bot]
90dd99471c build(deps): bump golangci/golangci-lint-action from 4 to 5
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 4 to 5.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-02 08:46:48 +02:00
Sanne Raymaekers
37233b7b62 .github/workflows/tests: disable codecov until further notice
The script hangs while pinging codecov for a url to upload the results
to.
2024-04-30 12:59:58 +02:00
Sanne Raymaekers
a87e3069a1 templates/openshift: make the maintenance template generic
We could deploy this job for both composer and each tenant's workers
that's present in app-intf. Then we can remove the maintenance bits from
the composer template.
2024-04-29 15:04:52 +02:00
Sanne Raymaekers
5a776c5b79 templates/openshift: split worker from composer maintenance 2024-04-25 17:32:21 +02:00
Alexander Todorov
c534689d57 Add CI step to detect possible problematic usage of trap
see for example this change:
https://github.com/osbuild/osbuild-composer/pull/3681/commits/13a3ca24ceef05164a77db1c71b929e262098f41
2024-04-19 13:16:11 +03:00
Achilleas Koutsou
f98169c29a go.mod: update to go v1.20
Go 1.20 is included in all currently supported distro versions.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2024-04-11 16:39:21 +02:00
Achilleas Koutsou
de54fc541e github: remove linting of dnf-json
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2024-04-11 16:31:50 +02:00
dependabot[bot]
ef07f2b81f build(deps): bump golangci/golangci-lint-action from 3 to 4
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 15:01:41 +01:00
dependabot[bot]
1bd19ab75b build(deps): bump stackrox/kube-linter-action from 1.0.4 to 1.0.5
Bumps [stackrox/kube-linter-action](https://github.com/stackrox/kube-linter-action) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/stackrox/kube-linter-action/releases)
- [Commits](https://github.com/stackrox/kube-linter-action/compare/v1.0.4...v1.0.5)

---
updated-dependencies:
- dependency-name: stackrox/kube-linter-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-04 15:00:30 +01:00
Diaa Sami
76e686df10 switch to images/pkg/dnfjson and remove internal copy
COMPOSER-2068
2024-02-20 15:55:47 +01:00
dependabot[bot]
232bce95b5 build(deps): bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-06 12:28:59 +01:00
dependabot[bot]
7b5c4eb526 build(deps): bump actions/setup-go from 4 to 5
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)

---
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>
2024-02-06 12:26:58 +01:00
Tomáš Hozza
625b1578fa Port osbuild/images v0.33.0 with dot-notation to composer
Update the osbuild/images to the version which introduces "dot notation"
for distro release versions.

 - Replace all uses of distroregistry by distrofactory.
 - Delete local version of reporegistry and use the one from the
   osbuild/images.
 - Weldr: unify `createWeldrAPI()` and `createWeldrAPI2()` into a single
   `createTestWeldrAPI()` function`.
 - store/fixture: rework fixtures to allow overriding the host distro
   name and host architecture name. A cleanup function to restore the
   host distro and arch names is always part of the fixture struct.
 - Delete `distro_mock` package, since it is no longer used.
 - Bump the required version of osbuild to 98, because the OSCAP
   customization is using the 'compress_results' stage option, which is
   not available in older versions of osbuild.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-01-26 11:32:34 +01:00
Brian C. Lane
d5e1bc28e9 tests: Run check-runners as part of the tests 2024-01-16 12:29:21 +01:00
Sanne Raymaekers
cf10847d3e .github: update apt metadata before installing deps 2023-11-08 10:39:28 +01:00
Tomáš Hozza
e1434746a2 Test: lint Packit configuration as part of CI
This will ensure that our Packit config stays valid.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-10-31 08:10:30 +01:00
Tomáš Hozza
b58a4b0009 Test: rename 'Lint' -> 'Golang Lint'
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-10-31 08:10:30 +01:00
Brian C. Lane
8ec783a4dd tests: Update to use golangci-lint v1.54.2 2023-10-02 23:59:12 +02:00
dependabot[bot]
9e3602c088 build(deps): bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [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/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-22 10:19:39 +02:00
Brian C. Lane
8ff4c0c40a tests: Add a check for valid snapshot urls
This pulls the list of snapshots from the rpmrepo API, greps the
codebase for all uses of rpmrepo.osbuild.org that look like a snapshot
name, and then checks to make sure they are still valid.
2023-07-28 11:28:40 +03:00
Ondřej Budai
cac9327b44 update to go 1.19
UBI and the oldest support Fedora (37) now all have go 1.19, so we are
cleared to switch.

gofmt now reformats comments in certain cases, so that explains the formatting
changes in this commit.
See https://go.dev/doc/go1.19#go-doc

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-07-21 19:18:00 +02:00
Alexander Todorov
1757e5473d Sanity check if cloud-cleaner workflow is enabled
GitHub will automatically disable scheduled actions defined on
repositories which don't receive much activity. In particular such
scheduled jobs will be disabled after 60 days of repo inactivity.

This CI job sanity checks the current status and reports back to
every PR so we can manually re-enable cloud-cleaner if necessary.
2023-06-27 15:08:42 +03:00
dependabot[bot]
88f863f14b build(deps): bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
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>
2023-03-20 10:56:34 +01:00
Antonio Murdaca
e34b88d6e4 .github/workflows: pin golangci-lint to v1.51.0
The new "latest" aka v1.51.1 started throwing unused errors during runs,
blocking all the other tests, to quickly unblock that until a proper
fix/rewrite is found, pin the version to the previous one.

Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
2023-02-06 11:04:06 +01:00
dependabot[bot]
70c61d4c24 build(deps): bump ludeeus/action-shellcheck
Bumps [ludeeus/action-shellcheck](https://github.com/ludeeus/action-shellcheck) from 6d3f514f44620b9d4488e380339edc0d9bbe2fba to 00cae500b08a931fb5698e11e79bfbd38e612a38.
- [Release notes](https://github.com/ludeeus/action-shellcheck/releases)
- [Commits](6d3f514f44...00cae500b0)

---
updated-dependencies:
- dependency-name: ludeeus/action-shellcheck
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 12:26:29 +01:00
Xiaofeng Wang
60e6107b42 Fix workflow shellcheck action deprecated set-output error
Use action-shellcheck@6d3f514f44620b9d4488e380339edc0d9bbe2fba to
have fix included
2023-01-20 15:02:33 +01:00
Ondřej Budai
0359647a82 go.mod: update to Go 1.18
Fedora 35 support was dropped, so we can update to a newer Go.

Stable RHEL 8 and 9 and Fedora 36 ships Go 1.18, so let's switch to it.

"//go:build" directives are now apparently enforced by go fmt, so that's why
there were added.

Also, all the github actions were adjusted to use Go 1.18.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-09 14:03:18 +01:00
Ondřej Budai
4bafe1ead9 remove Fedora 35 support
Fedora 35 is going EOL on Tue 2022-12-13. At the time of writing this commit
message, that's the next day. As we do releases on Wednesdays, the next
release will never find its way to F35 and thus, there's no point in keeping
support for it.

Let's delete everything that relates to Fedora 35. If there's something that
cannot be deleted (e.g. CI containers based on F35), let's upgrade it to F37.

TestCrossArchDepsolve now uses CentOS Stream 8 because RHEL 8.4 cannot read
F37 repository metadata. This is a similar issue to
https://bugzilla.redhat.com/show_bug.cgi?id=2004853 . Basically, newer
repositories can be only read by libmodulemd >= 2.11.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-06 11:34:50 +01:00
Ondřej Budai
8c4689f082 workflows: mark the working directory safe for git
Github actions have a peculiar behaviour: The "job root" directory is owned
by user with ID 1001 whereas many containers (like the Fedora one) run as root
by default. This causes git to freak out because repositories owned by
different users aren't considered safe anymore and must be explicitly allow-
listed.

This becomes a problem when we switch to Go 1.18 because it stamps build with
Git information which fails because the repository technically isn't safe.

Let's fix this by marking the repository as a safe one.

Note that the actions/checkout action has a set-safe-directory feature, but
this one is not permanent. After the action is done, the setting is removed.
See https://github.com/actions/checkout/pull/762

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-06 11:34:50 +01:00
Sanne Raymaekers
07a8f3d5ea test: adapt to shellcheck v0.9.0 2022-12-13 13:55:53 +01:00
Brian C. Lane
87b5e38c45 workflows: Update to use actions/checkout@v3 2022-12-07 16:53:25 -08:00
Brian C. Lane
d73171fdde Use go install instead of deprecated go get
In go 1.18 'go install' needs to be used to install an executable. See
https://go.dev/doc/go-get-install-deprecation and
https://go.dev/doc/manage-install
2022-11-09 12:08:43 +01:00
Brian C. Lane
29fb97f3d6 workflow: Use latest golangci-lint workflow action 2022-09-15 03:57:40 -07:00
Tomas Hozza
31b1a383f0 tools/koji-compose.py: test with pylint and fix found issues
Check `tools/koji-compose.py` using pylint as part of GitHub actions.
Fix all issues that were found by pylint.
2022-08-04 11:55:43 +02:00
Christian Kellner
4b67e12958 ci: install gpgme-devel for db test
This prepares the usage of the `internal/container` from composer
directly, as opposed to the existing use in the worker. Said pkg
uses the `containers/image/v5`, which uses `proglottis/gpgme` and
the latter needs the gpgme C library. We therefore install it and
its dependencies.
2022-07-21 13:32:07 +02:00
dependabot[bot]
2285a0a03b build(deps): bump actions/setup-go from 2 to 3
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
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>
2022-07-16 19:15:06 +02:00
Sanne Raymaekers
d329af12a1 .github/workflows: Add DB tests 2022-07-04 15:37:28 +02:00
Christian Kellner
986f076276 container: add support for uploading to registries
Add a new generic container registry client via a new `container`
package. Use this to create a command line utility as well as a
new upload target for container registries.

The code uses the github.com/containers/* project and packages to
interact with container registires that is also used by skopeo,
podman et al. One if the dependencies is `proglottis/gpgme` that
is using cgo to bind libgpgme, so we have to add the corresponding
devel package to the BuildRequires as well as installing it on CI.

Checks will follow later via an integration test.
2022-06-29 10:02:46 +02:00
Achilleas Koutsou
8070321169 github: run unit tests on Fedora and force dnf
Run unit tests in GitHub workflows in a Fedora container to enable the
dnf-json tests.  Run the tests alone with the `force-dnf` flag to make
sure the tests pass and are not skipped.

Install Go using dnf instead of the GH action.  The action seems to
cause issues with the $PATH.

Use the registry.fedoraproject.org container for both unit tests and
pylint on dnf-json.
Requires some reordering of the steps in each workflow and the addition
of `git-core` as a dependency.

Using Fedora 35 instead of latest because of changes in the go build
tool: The new -buildvcs flag causes issues on GitHub actions.
2022-06-01 11:36:52 +01:00
Achilleas Koutsou
387b982a79 github: fix indentation in workflows/tests 2022-06-01 11:36:52 +01:00
Sanne Raymaekers
2208cb1122 .github: Add kube-linter check 2022-05-27 15:09:42 +02:00