Compare commits
8 Commits
f33ff25708
...
ad5254ded3
Author | SHA1 | Date | |
---|---|---|---|
ad5254ded3 | |||
c3e5a138b4 | |||
5fcc874985 | |||
b626012591 | |||
51158fae47 | |||
e76b63f392 | |||
7b3c927313 | |||
01b9c2e9f2 |
2
.github/workflows/e2e.yml
vendored
2
.github/workflows/e2e.yml
vendored
@ -2,6 +2,8 @@ name: E2E
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
2
.github/workflows/ubuntu.yml
vendored
2
.github/workflows/ubuntu.yml
vendored
@ -2,6 +2,8 @@ name: Ubuntu
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
push:
|
||||
paths-ignore:
|
||||
- ".github/workflows/images-*"
|
||||
|
@ -155,6 +155,8 @@ func Build(flog zerolog.Logger, tmp string, ka Artifact,
|
||||
log.Fatal().Err(err).Msg("container creation failure")
|
||||
}
|
||||
|
||||
c.Args = append(c.Args, "--network", "none")
|
||||
|
||||
output, err = c.Run(outdir, []string{
|
||||
buildCommand + " && chmod -R 777 /work",
|
||||
})
|
||||
|
17
cmd/pew.go
17
cmd/pew.go
@ -230,22 +230,25 @@ func (cmd *PewCmd) Run(g *Globals) (err error) {
|
||||
ka.Targets = []artifact.Target{km}
|
||||
}
|
||||
|
||||
// TODO there was a lib for merge structures
|
||||
ka.Qemu.Timeout.Duration = g.Config.Qemu.Timeout.Duration
|
||||
ka.Docker.Timeout.Duration = g.Config.Docker.Timeout.Duration
|
||||
if ka.Qemu.Timeout.Duration == 0 {
|
||||
ka.Qemu.Timeout.Duration = g.Config.Qemu.Timeout.Duration
|
||||
}
|
||||
|
||||
if ka.Docker.Timeout.Duration == 0 {
|
||||
ka.Docker.Timeout.Duration = g.Config.Docker.Timeout.Duration
|
||||
}
|
||||
|
||||
if cmd.QemuTimeout != 0 {
|
||||
log.Info().Msgf("Set qemu timeout to %s", cmd.QemuTimeout)
|
||||
g.Config.Qemu.Timeout.Duration = cmd.QemuTimeout
|
||||
ka.Qemu.Timeout.Duration = cmd.QemuTimeout
|
||||
}
|
||||
|
||||
if cmd.DockerTimeout != 0 {
|
||||
log.Info().Msgf("Set docker timeout to %s", cmd.DockerTimeout)
|
||||
g.Config.Docker.Timeout.Duration = cmd.DockerTimeout
|
||||
ka.Docker.Timeout.Duration = cmd.DockerTimeout
|
||||
}
|
||||
|
||||
log.Info().Msgf("Qemu timeout: %s", ka.Qemu.Timeout.Duration)
|
||||
log.Info().Msgf("Docker timeout: %s", ka.Docker.Timeout.Duration)
|
||||
|
||||
if cmd.Tag == "" {
|
||||
cmd.Tag = fmt.Sprintf("%d", time.Now().Unix())
|
||||
}
|
||||
|
@ -79,36 +79,41 @@ func (centos CentOS) runs() (commands []string) {
|
||||
// TODO refactor
|
||||
switch centos.release {
|
||||
case "6":
|
||||
repofmt := "[6.%d-%s]\\nbaseurl=https://vault.centos.org/6.%d/%s/$basearch/\\ngpgcheck=0"
|
||||
repofmt := "[6.%d-%s]\\n" +
|
||||
"name=CentOS-6.%d - %s\\n" +
|
||||
"baseurl=https://vault.centos.org/6.%d/%s/$basearch/\\n" +
|
||||
"gpgcheck=0"
|
||||
for i := 0; i <= 10; i++ {
|
||||
repos = append(repos, fmt.Sprintf(repofmt, i, "os", i, "os"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, i, "updates", i, "updates"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, i, "os", i, "os", i, "os"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, i, "updates", i, "updates", i, "updates"))
|
||||
}
|
||||
cmdf("rm /etc/yum.repos.d/*")
|
||||
case "7":
|
||||
repofmt := "[%s-%s]\\nbaseurl=https://vault.centos.org/%s/%s/$basearch/\\ngpgcheck=0"
|
||||
repofmt := "[%s-%s]\\n" +
|
||||
"name=CentOS-%s - %s\\n" +
|
||||
"baseurl=https://vault.centos.org/%s/%s/$basearch/\\n" +
|
||||
"gpgcheck=0"
|
||||
for _, ver := range []string{
|
||||
"7.0.1406", "7.1.1503", "7.2.1511",
|
||||
"7.3.1611", "7.4.1708", "7.5.1804",
|
||||
"7.6.1810", "7.7.1908", "7.8.2003",
|
||||
"7.9.2009",
|
||||
} {
|
||||
repos = append(repos, fmt.Sprintf(repofmt, ver, "os", ver, "os"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, ver, "updates", ver, "updates"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, ver, "os", ver, "os", ver, "os"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, ver, "updates", ver, "updates", ver, "updates"))
|
||||
}
|
||||
|
||||
// FIXME http/gpgcheck=0
|
||||
repofmt = "[%s-%s]\\nbaseurl=http://mirror.centos.org/centos-7/%s/%s/$basearch/\\ngpgcheck=0"
|
||||
repos = append(repos, fmt.Sprintf(repofmt, "7.9.2009", "os", "7.9.2009", "os"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, "7.9.2009", "updates", "7.9.2009", "updates"))
|
||||
case "8":
|
||||
repofmt := "[%s-%s]\\nbaseurl=https://vault.centos.org/%s/%s/$basearch/os/\\ngpgcheck=0"
|
||||
repofmt := "[%s-%s]\\n" +
|
||||
"name=CentOS-%s - %s\\n" +
|
||||
"baseurl=https://vault.centos.org/%s/%s/$basearch/os/\\n" +
|
||||
"gpgcheck=0"
|
||||
|
||||
for _, ver := range []string{
|
||||
"8.0.1905", "8.1.1911", "8.2.2004",
|
||||
"8.3.2011", "8.4.2105", "8.5.2111",
|
||||
} {
|
||||
repos = append(repos, fmt.Sprintf(repofmt, ver, "baseos", ver, "BaseOS"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, ver, "appstream", ver, "AppStream"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, ver, "baseos", ver, "baseos", ver, "BaseOS"))
|
||||
repos = append(repos, fmt.Sprintf(repofmt, ver, "appstream", ver, "appstream", ver, "AppStream"))
|
||||
}
|
||||
default:
|
||||
log.Fatal().Msgf("no support for centos %s", centos.release)
|
||||
@ -116,6 +121,7 @@ func (centos CentOS) runs() (commands []string) {
|
||||
}
|
||||
|
||||
cmdf("sed -i 's/enabled=1/enabled=0/' /etc/yum.repos.d/* || true")
|
||||
cmdf("sed -i 's/name/enabled=0\\nname/' /etc/yum.repos.d/* || true")
|
||||
|
||||
for _, repo := range repos {
|
||||
cmdf("echo -e '%s' >> /etc/yum.repos.d/oot.repo\n", repo)
|
||||
|
@ -342,6 +342,7 @@ func (q *System) Start() (err error) {
|
||||
|
||||
if q.Timeout != 0 {
|
||||
go func() {
|
||||
q.Log.Debug().Msgf("qemu wait for %s before kill", q.Timeout)
|
||||
time.Sleep(q.Timeout)
|
||||
q.KilledByTimeout = true
|
||||
q.Stop()
|
||||
|
Loading…
Reference in New Issue
Block a user