mirror of
https://github.com/containers/podman.git
synced 2025-07-03 01:08:02 +08:00
Add SQLite job to CI
Signed-off-by: Matt Heon <mheon@redhat.com>
This commit is contained in:
10
.cirrus.yml
10
.cirrus.yml
@ -103,6 +103,16 @@ build_task:
|
||||
# ID for re-use of build output
|
||||
CI_DESIRED_RUNTIME: crun
|
||||
CI_DESIRED_NETWORK: netavark
|
||||
CI_DESIRED_DATABASE: boltdb
|
||||
- env: &sqliteenvvars
|
||||
DISTRO_NV: ${FEDORA_NAME}
|
||||
# Not used here, is used in other tasks
|
||||
VM_IMAGE_NAME: ${FEDORA_CACHE_IMAGE_NAME}
|
||||
CTR_FQIN: ${FEDORA_CONTAINER_FQIN}
|
||||
# ID for re-use of build output
|
||||
CI_DESIRED_RUNTIME: crun
|
||||
CI_DESIRED_NETWORK: netavark
|
||||
CI_DESIRED_DATABASE: sqlite
|
||||
- env: &priorfedora_envvars
|
||||
DISTRO_NV: ${PRIOR_FEDORA_NAME}
|
||||
VM_IMAGE_NAME: ${PRIOR_FEDORA_CACHE_IMAGE_NAME}
|
||||
|
@ -93,7 +93,7 @@ EPOCH_TEST_COMMIT="$CIRRUS_BASE_SHA"
|
||||
# contexts, such as host->container or root->rootless user
|
||||
#
|
||||
# List of envariables which must be EXACT matches
|
||||
PASSTHROUGH_ENV_EXACT='CGROUP_MANAGER|DEST_BRANCH|DISTRO_NV|GOCACHE|GOPATH|GOSRC|NETWORK_BACKEND|OCI_RUNTIME|ROOTLESS_USER|SCRIPT_BASE|SKIP_USERNS|EC2_INST_TYPE'
|
||||
PASSTHROUGH_ENV_EXACT='CGROUP_MANAGER|DEST_BRANCH|DISTRO_NV|GOCACHE|GOPATH|GOSRC|NETWORK_BACKEND|OCI_RUNTIME|ROOTLESS_USER|SCRIPT_BASE|SKIP_USERNS|EC2_INST_TYPE|PODMAN_DB'
|
||||
|
||||
# List of envariable patterns which must match AT THE BEGINNING of the name.
|
||||
PASSTHROUGH_ENV_ATSTART='CI|TEST'
|
||||
|
@ -142,6 +142,26 @@ case "$CI_DESIRED_NETWORK" in
|
||||
*) die_unknown CI_DESIRED_NETWORK ;;
|
||||
esac
|
||||
|
||||
# Database: force SQLite or BoltDB as requested in .cirrus.yml.
|
||||
# If unset, will default to BoltDB.
|
||||
# shellcheck disable=SC2154
|
||||
case "$CI_DESIRED_DATABASE" in
|
||||
sqlite)
|
||||
warn "Forcing PODMAN_DB=sqlite"
|
||||
echo "PODMAN_DB=sqlite" >> /etc/ci_environment
|
||||
;;
|
||||
boltdb)
|
||||
warn "Forcing PODMAN_DB=boltdb"
|
||||
echo "PODMAN_DB=boltdb" >> /etc/ci_environment
|
||||
;;
|
||||
"")
|
||||
warn "Using default Podman database"
|
||||
;;
|
||||
*)
|
||||
die_unknown CI_DESIRED_DATABASE
|
||||
;;
|
||||
esac
|
||||
|
||||
# Required to be defined by caller: The environment where primary testing happens
|
||||
# shellcheck disable=SC2154
|
||||
case "$TEST_ENVIRON" in
|
||||
|
@ -282,6 +282,7 @@ func CreateExitCommandArgs(storageConfig storageTypes.StoreOptions, config *conf
|
||||
"--network-config-dir", config.Network.NetworkConfigDir,
|
||||
"--network-backend", config.Network.NetworkBackend,
|
||||
"--volumepath", config.Engine.VolumePath,
|
||||
"--db-backend", config.Engine.DBBackend,
|
||||
fmt.Sprintf("--transient-store=%t", storageConfig.TransientStore),
|
||||
}
|
||||
if config.Engine.OCIRuntime != "" {
|
||||
|
@ -249,6 +249,11 @@ func PodmanTestCreateUtil(tempDir string, remote bool) *PodmanTestIntegration {
|
||||
}
|
||||
os.Setenv("DISABLE_HC_SYSTEMD", "true")
|
||||
|
||||
dbBackend := "boltdb"
|
||||
if os.Getenv("PODMAN_DB") == "sqlite" {
|
||||
dbBackend = "sqlite"
|
||||
}
|
||||
|
||||
networkBackend := CNI
|
||||
networkConfigDir := "/etc/cni/net.d"
|
||||
if isRootless() {
|
||||
@ -291,6 +296,7 @@ func PodmanTestCreateUtil(tempDir string, remote bool) *PodmanTestIntegration {
|
||||
ImageCacheFS: storageFs,
|
||||
ImageCacheDir: ImageCacheDir,
|
||||
NetworkBackend: networkBackend,
|
||||
DatabaseBackend: dbBackend,
|
||||
},
|
||||
ConmonBinary: conmonBinary,
|
||||
QuadletBinary: quadletBinary,
|
||||
@ -918,8 +924,8 @@ func (p *PodmanTestIntegration) makeOptions(args []string, noEvents, noCache boo
|
||||
eventsType = "none"
|
||||
}
|
||||
|
||||
podmanOptions := strings.Split(fmt.Sprintf("%s--root %s --runroot %s --runtime %s --conmon %s --network-config-dir %s --network-backend %s --cgroup-manager %s --tmpdir %s --events-backend %s",
|
||||
debug, p.Root, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.NetworkConfigDir, p.NetworkBackend.ToString(), p.CgroupManager, p.TmpDir, eventsType), " ")
|
||||
podmanOptions := strings.Split(fmt.Sprintf("%s--root %s --runroot %s --runtime %s --conmon %s --network-config-dir %s --network-backend %s --cgroup-manager %s --tmpdir %s --events-backend %s --db-backend %s",
|
||||
debug, p.Root, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.NetworkConfigDir, p.NetworkBackend.ToString(), p.CgroupManager, p.TmpDir, eventsType, p.DatabaseBackend), " ")
|
||||
|
||||
podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
|
||||
if !noCache {
|
||||
|
@ -65,6 +65,7 @@ type PodmanTest struct {
|
||||
ImageCacheDir string
|
||||
ImageCacheFS string
|
||||
NetworkBackend NetworkBackend
|
||||
DatabaseBackend string
|
||||
PodmanBinary string
|
||||
PodmanMakeOptions func(args []string, noEvents, noCache bool) []string
|
||||
RemoteCommand *exec.Cmd
|
||||
|
Reference in New Issue
Block a user