Commit graph

2063 commits

Author SHA1 Message Date
Alexander Todorov
591b0fa1be Disable Shutzbot in favor of GitLab CI 2021-05-31 11:44:37 +02:00
Alexander Todorov
3717ddfbbd GitLab CI: Add GCP tests 2021-05-31 11:44:37 +02:00
yih
661d59e534 add test case to push/pull edge container images in quay.io 2021-05-26 12:16:42 +03:00
Alexander Todorov
dedc4b9fc9 GitLab CI: User newer terraform SHA
brings in some of the missing openstack/ images definitions
2021-05-25 12:39:59 +03:00
Alexander Todorov
4a580222c3 GitLab CI: Add Fedora 32 & RHEL 8.4 to OSTree testing 2021-05-25 12:39:59 +03:00
Alexander Todorov
9478b9e40e GitLab CI: comment out test jobs which will currently fail
see ticket references for more info
2021-05-25 12:39:59 +03:00
Alexander Todorov
c891eecaef GitLab CI: Add Fedora 34 to Integration tests 2021-05-25 12:39:59 +03:00
Alexander Todorov
760d6010f5 GitLab CI: Add more Base runners 2021-05-25 12:39:59 +03:00
Alexander Todorov
8532fe16ee GitLab CI: Add container build stage 2021-05-25 12:39:59 +03:00
Alexander Todorov
e953cffb89 GitLab CI: Add 8.4-aarch64 to RPM build section 2021-05-25 12:39:59 +03: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
Martin Sehnoutka
4a54ab43e5 test/cases: Introduce common "regression" test for all distros
Create an entry point for all regression test called "regression.sh" and
run it as part of the base tests for all our distros. This entry
point contains logic for running only the test cases that are
appropriate for a given distribution.
2021-05-20 13:07:07 +03:00
sanne
65b7ce10ba distribution: Add second service to composer clouddot deployment 2021-05-18 12:07:30 +02:00
sanne
0518933676 distribution: Add state directory
This should become a PersistentVolumeClaim in future, but let's get the
deployment running first.
2021-05-17 21:43:55 +02:00
Ondřej Budai
a19b883727 distro/rhel90: enable cloud-init
cloud-init was enabled explicitly in the image-factory kickstart and thus we
need to explicitly enable it too.

Fixes: rhbz#1960309
Fixes: COMPOSER-920
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-05-17 14:55:50 +02:00
Ondřej Budai
bb60905309 test/libvirt: remove dead code
We don't test vmdk images in libvirt.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-05-17 14:55:50 +02:00
Ondřej Budai
3bf04d12f8 test/libvirt: use a minimal blueprint
All our images now support and have enabled cloud-init, there's no need
to explicitly enable it and install it in a kickstart.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-05-17 14:55:50 +02:00
Ondřej Budai
9029d169d9 test/libvirt: don't test vhd images
VHD images are meant for Azure and we indeed test if they're bootable in
test/cases/azure.sh . There's no reason to test them using libvirt anymore
so this commit just removes the test.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-05-17 14:55:50 +02:00
Tomas Hozza
aa6665ad01 Use RepoRegistry in composer and Weldr API
Modify composer to use RepoRegistry, instead of loading the host
repositories, when initializing WeldrAPI.

Modify WeldrAPI to use RepoRegistry, instead of a map of repository
definitions. Make sure that the RepoRegistry method specific to image
type is used in Welder where appropriate. Specifically when depsolving a
Blueprint, which is used to build a specific image type. Update Weldr
API unit tests to reflect the change.

Add a new method to RepoRegistry, allowing to get list of repositories,
which should be used for building an image for a given architecture,
without specifying the exact image type. Add relevant unit tests.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-05-14 15:43:00 +02:00
Tomas Hozza
fba9fe1072 Make the Distroregistry FromHost() return distro with correct name
Composer does not have 1:1 mapping of what can be the Host Distro name
and the names of supported distributions held in the Distroregistry.

The fact that the host distro `Name()` method as passed to the Weldr API
does not return the same name as what is used as distro name for
repository definitions. This makes it hard to use `distro.Distro` and
`distro.Arch` directly and rely on the values returned by them as their
name.

Add `New*HostDistro()` to all distro definitions, accepting the name
that should be returned by the distro's `Name()` method. This is useful
mainly if the host distro is Beta or Stream variant of the distro.

Change the distroregistry.Registry to contain host distro as a separate
value set when creating it using `New()` function. This value is
returned by `Registry.FromHost()` method. Determining the host distro is
handled by the `NewDefault()` function. Move the distro name mangling to
distroregistry package. Add relevant unit tests.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-05-14 15:43:00 +02:00
Tomas Hozza
dda9cce03e Add support for image type tags in rpmmd and add RepoRegistry API
Extend the RepoConfig structure to contain new field ImageTypeTags.
Extend also other structures and functions as needed, to support loading
repository definitions, which use this new field. The idea is that a
repository should be used for building all image types, unless it has
some ImageTypeTags defined. In such case, it should be used only for
building the specific image types, which names are specified in the new
field.

Add RepoRegistry as a higher-level API to load and manage repository
definitions for each distribution. Currently it provides one method,
which returns a set of repositories needed to build a given image
type. The RepoRegistry uses the new ImageTypeTags field in the RepoConfig
structure and returns all the needed repositories for the image type.

Modify rpmmd unit tests and add unit tests for RepoRegistry.

Add News entry describing the change done to RepoConfig and its JSON
representation.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-05-14 15:43:00 +02: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
Tomas Hozza
f7f064274a Tests: remove fedoratest and replace it with test_distro
fedoratest was yet another dummy distribution used by unit tests. After
the rework of test_distro, there is no reason to not use it as the only
distro implementation for testing purposes.

Remove fedoratest distro and replace it with test_distro in all affected
tests.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-05-14 15:43:00 +02:00
Tomas Hozza
e5dd45b71c Extend the "Test Distro" definition and modify affected tests
Extend the "Test Distro" implementation and definition to contain two
architectures and make the second architecture contain two image types.
Add New2() function returning another "Test Distro".

Modify the `internal/store` unit tests to reflect changes done to the
"Test Distro".

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-05-14 15:43:00 +02:00
Jakub Rusz
8dcf859473 tests: move some integration tests to gitlab CI
This also includes several modifications to tests scripts to
enable them running in gitlab CI.
2021-05-12 15:38:30 +03:00
Jakub Rusz
e613b2456b tests: modify DISTRO_CODE usage
Set DISTRO_CODE if unset for gitlab CI
2021-05-12 15:38:30 +03:00
Yuxin Sun
5e60485705 Update yuxisun responsibility
Signed-off-by: Yuxin Sun <yuxisun@redhat.com>
2021-05-12 15:11:54 +03:00
Alexander Todorov
57cebbfaea tests: Define COMPOSE_URL/COMPOSE_ID in a single place. Fix #1397
we don't want this defined multiple times in different places
2021-05-12 09:26:31 +02:00
Achilleas Koutsou
cca084d5ce rhel85: nolint package for unused private functions
Package contains unexported helper functions for future implementations
of pipelines.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
e8a1509d46 rhel84: only download parent commit for installer
The parent commit would be added to the sources unconditionally. This
is only necessary for the edge-installer image type.

This doesn't technically change the build behaviour of an existing
distro and image type.  It simply avoids unnecessarily downloading an
ostree commit when only the ref is needed.
It does change the 'sources' section of the manifest however.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
a49ba1e672 rhel84: minor typo fix 2021-05-11 12:10:09 +02:00
Achilleas Koutsou
ee4eb5d41e rhel85: add tests
Basic tests for arch listing and empty image type lists.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
c218b5c517 test: x86_64 repos for RHEL 8.5 2021-05-11 12:10:09 +02:00
Achilleas Koutsou
9412477b3f rhel85: split distro into multiple files
Split pipelines, inputs, and options into separate files for easier
navigation.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
95947f60c7 rhel85: pipeline function separation
The single `pipelines()` function is now replaced by multiple functions
for different purposes:
- `edgeCorePipelines()` defines the pipelines that create an edge
  commit. This is used by both the `edge-commit` and `edge-container`
  images.
- `edgeCommitPipelines()` and `edgeContainerPipelines()` define the
  pipelines for `edge-commit` and `edge-container` respectively. They
  share the core pipelines but differ in their final pipeline for
  assembling the image into either a tarball or a container.
- `edgeInstallerPipeline()` shares almost no common parts with other
  pipelines (only the `buildPipeline()`).

The `pipelines` function for each image type is set during creation of
the instance.

Individual pipeline functions are no longer methods of the image type.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
68a81c15fe tools: add RHEL 8.5 repos for test case generator 2021-05-11 12:10:09 +02:00
Achilleas Koutsou
2833e99928 rhel85: add tar pipeline
Tar pipeline helper function that contains a single tar stage.
This is the equivalent of the old tar assembler.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
883adea2ac osbuild2: tar stage
Rename creation function from old assembler and add inputs.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
5c3dd46d63 rhel85: installer pipelines definition
Separate function for installer-specific pipelines.
The installer image type is very different compared to the other edge
types (and even more so compared to the more general images), so
separating out the pipelines that are specific to the installer Manifest
makes the whole method a bit more readable.

This function is not "wired" to the main pipelines generation, but will
be when the image type is defined.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
f7882993f9 osbuild2/bootiso: arch-based xz compression option
Added a helper function to the bootiso stage for setting the BCJ option
for xz compression.
The FSCompression struct is changed to use a pointer for the Options
substruct so it can be omitted when nil (omitempty).
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
3cf8a545a6 rhel85: pipelines and stages helper functions
Based on rhel84 with minor changes:
- moved options and customizations checking to its own method on
  imageType.
- added global `osVersion = "8.5"` for use in various labels and
  metadata files.
- pipelines() function is empty and returns with "not implemented" error
  since  no image types are defined.
2021-05-11 12:10:09 +02:00
Achilleas Koutsou
34b5c5b3f1 weldr: use rhel-8 repos for all RHEL 8.x distros 2021-05-11 12:10:09 +02:00
Achilleas Koutsou
6789bcca98 rhel85: implement PackageSets() method 2021-05-11 12:10:09 +02:00
Achilleas Koutsou
a45e4f4bc8 Add rhel85 to distro registry 2021-05-11 12:10:09 +02:00
Achilleas Koutsou
ee5d59ab44 New distro: rhel85
Distro skeleton for RHEL 8.5 with implementations for the basic methods.
Initialiser (New()) creates empty architectures.
2021-05-11 12:10:09 +02:00
Alexander Todorov
9728d2361a tests: Define COMPOSE_URL if undefined 2021-05-10 11:15:26 +03:00
Jakub Rusz
cced541eb1 tests: change ostree boot location for RHEL 8.4
Change BOOT_LOCATION to COMPOSE_URL until GA is released.
2021-05-10 11:15:26 +03:00
Ondřej Budai
31a0ca3284 spec: fix rpm build on Fedora 34
Not proud of the fix but it should work for now. See the comment in the spec
file for more information and also the upstream PR for more context:

https://github.com/getkin/kin-openapi/pull/351

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-05-08 20:15:56 +02:00
Martin Sehnoutka
9a0236eb09 distros but rhel84: exclude packages explicitly mentioned in a blueprint
see the previous commit for further explanation
2021-05-07 09:26:52 +02:00
Martin Sehnoutka
98dd7d7737 rhel84: remove excluded package if explicitly specified in the bp
When a users wants to install a package that itself is excluded or its
dependency is excluded, it fails the build. There is no known workaround
for this shorcoming of our current design.

Therefore, remove a package from the list of excluded if it is
explicitly mentioned in a blueprint. This will not solve the issue with
dependencies, but it will create a possibility of a workaround.

Also, introduce regression test to verify the bug fix and hook it into
CentOS CI (this issue was reported against RHEL, but CentOS runs on AWS
so it is better to verify the fix there).
2021-05-07 09:26:52 +02:00