feat!: rename option for using pre-built containers
This commit is contained in:
parent
d3a575e5e3
commit
9b379eded8
2
.github/workflows/e2e.yml
vendored
2
.github/workflows/e2e.yml
vendored
@ -139,7 +139,7 @@ jobs:
|
|||||||
echo 'Type=oneshot' >> test.service
|
echo 'Type=oneshot' >> test.service
|
||||||
echo 'WorkingDirectory=/root/test' >> test.service
|
echo 'WorkingDirectory=/root/test' >> test.service
|
||||||
echo 'TimeoutStopSec=1' >> test.service
|
echo 'TimeoutStopSec=1' >> test.service
|
||||||
echo 'ExecStart=/usr/local/bin/out-of-tree kernel --no-container-cache autogen --threads=8 --max=64 --shuffle' >> test.service
|
echo 'ExecStart=/usr/local/bin/out-of-tree kernel --no-prebuilt-containers autogen --threads=8 --max=64 --shuffle' >> test.service
|
||||||
echo 'ExecStart=/usr/local/bin/out-of-tree pew --qemu-timeout=10m --threads=4 --include-internal-errors' >> test.service
|
echo 'ExecStart=/usr/local/bin/out-of-tree pew --qemu-timeout=10m --threads=4 --include-internal-errors' >> test.service
|
||||||
|
|
||||||
scp test.service root@$IP:/etc/systemd/system/test.service
|
scp test.service root@$IP:/etc/systemd/system/test.service
|
||||||
|
@ -35,7 +35,7 @@ type KernelCmd struct {
|
|||||||
Retries int `help:"amount of tries for each kernel" default:"2"`
|
Retries int `help:"amount of tries for each kernel" default:"2"`
|
||||||
Threads int `help:"threads for parallel installation" default:"1"`
|
Threads int `help:"threads for parallel installation" default:"1"`
|
||||||
Update bool `help:"update container"`
|
Update bool `help:"update container"`
|
||||||
ContainerCache bool `help:"try prebuilt container images first" default:"true" negatable:""`
|
PrebuiltContainers bool `help:"try prebuilt container images first" default:"true" negatable:""`
|
||||||
Max int `help:"maximum kernels to download" default:"100500"`
|
Max int `help:"maximum kernels to download" default:"100500"`
|
||||||
NoPrune bool `help:"do not remove dangling or unused images from local storage after build"`
|
NoPrune bool `help:"do not remove dangling or unused images from local storage after build"`
|
||||||
NoCfgRegen bool `help:"do not update kernels.toml"`
|
NoCfgRegen bool `help:"do not update kernels.toml"`
|
||||||
@ -168,8 +168,8 @@ func (cmd *KernelCmd) GenKernel(km artifact.Target, pkg string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cmd *KernelCmd) fetchContainerCache(c container.Container) {
|
func (cmd *KernelCmd) fetchPrebuiltContainer(c container.Container) {
|
||||||
if !cmd.ContainerCache {
|
if !cmd.PrebuiltContainers {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if c.Exist() && container.UseCache {
|
if c.Exist() && container.UseCache {
|
||||||
@ -235,7 +235,7 @@ func (cmd *KernelCmd) Generate(g *Globals, km artifact.Target) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.fetchContainerCache(c)
|
cmd.fetchPrebuiltContainer(c)
|
||||||
|
|
||||||
pkgs, err := kernel.MatchPackages(km)
|
pkgs, err := kernel.MatchPackages(km)
|
||||||
if err != nil || cmd.shutdown {
|
if err != nil || cmd.shutdown {
|
||||||
@ -335,7 +335,7 @@ func (cmd *KernelListRemoteCmd) Run(kernelCmd *KernelCmd, g *Globals) (err error
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
kernelCmd.fetchContainerCache(c)
|
kernelCmd.fetchPrebuiltContainer(c)
|
||||||
|
|
||||||
pkgs, err := kernel.MatchPackages(km)
|
pkgs, err := kernel.MatchPackages(km)
|
||||||
// error check skipped on purpose
|
// error check skipped on purpose
|
||||||
|
Loading…
Reference in New Issue
Block a user