mirror of
https://github.com/kairos-io/kairos.git
synced 2025-02-09 05:18:51 +00:00
🤖 Update immucore dev testing (#1059)
There is now less files to copy over Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
This commit is contained in:
parent
69a076caa0
commit
836d81eb00
@ -367,11 +367,13 @@ docker:
|
||||
ARG IMMUCORE_DEV
|
||||
ARG IMMUCORE_DEV_BRANCH=master
|
||||
IF [ "$IMMUCORE_DEV" = "true" ]
|
||||
RUN rm -Rf /usr/lib/dracut/modules.d/28immucore
|
||||
RUN rm /etc/dracut.conf.d/10-immucore.conf
|
||||
RUN rm /etc/dracut.conf.d/02-kairos-setup-initramfs.conf || exit 0
|
||||
RUN rm /etc/dracut.conf.d/50-kairos-initrd.conf || exit 0
|
||||
COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+build-immucore/immucore /usr/bin/immucore
|
||||
COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+dracut-artifacts/28immucore usr/lib/dracut/modules.d/28immucore
|
||||
COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+dracut-artifacts/02-kairos-setup-initramfs.conf /etc/dracut.conf.d/02-kairos-setup-initramfs.conf
|
||||
COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+dracut-artifacts/28immucore /usr/lib/dracut/modules.d/28immucore
|
||||
COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+dracut-artifacts/10-immucore.conf /etc/dracut.conf.d/10-immucore.conf
|
||||
COPY github.com/kairos-io/immucore:$IMMUCORE_DEV_BRANCH+dracut-artifacts/50-kairos-initrd.conf /etc/dracut.conf.d/50-kairos-initrd.conf
|
||||
END
|
||||
# END
|
||||
|
||||
|
@ -89,6 +89,9 @@ func gatherLogs(vm VM) {
|
||||
"/run/blkid",
|
||||
"/run/events.json",
|
||||
"/run/cmdline",
|
||||
"/run/immucore/immucore.log",
|
||||
"/run/immucore/initramfs_stage.log",
|
||||
"/run/immucore/rootfs_stage.log",
|
||||
})
|
||||
}
|
||||
|
||||
@ -138,7 +141,6 @@ func startVM() (context.Context, VM) {
|
||||
types.WithStateDir(stateDir),
|
||||
types.WithDataSource(os.Getenv("DATASOURCE")),
|
||||
}
|
||||
|
||||
if os.Getenv("KVM") != "" {
|
||||
opts = append(opts, func(m *types.MachineConfig) error {
|
||||
m.Args = append(m.Args,
|
||||
|
@ -32,29 +32,33 @@ var _ = Describe("k3s upgrade manual test", Label("upgrade-with-cli"), func() {
|
||||
}
|
||||
|
||||
expectDefaultService(vm)
|
||||
|
||||
By("Copying config file")
|
||||
err := vm.Scp("assets/config.yaml", "/tmp/config.yaml", "0770")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
By("Manually installing")
|
||||
out, err := vm.Sudo("kairos-agent manual-install --device auto /tmp/config.yaml")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(out).Should(ContainSubstring("Running after-install hook"))
|
||||
vm.Sudo("sync")
|
||||
By("Rebooting")
|
||||
vm.Reboot()
|
||||
})
|
||||
|
||||
It("can upgrade to current image", func() {
|
||||
currentVersion, err := vm.Sudo(". /etc/os-release; echo $VERSION")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
By(fmt.Sprintf("Checking current version: %s", currentVersion))
|
||||
Expect(currentVersion).To(ContainSubstring("v"))
|
||||
_, err = vm.Sudo("kairos-agent")
|
||||
if err == nil {
|
||||
By(fmt.Sprintf("Upgrading to: %s", containerImage))
|
||||
out, err := vm.Sudo("kairos-agent upgrade --force --image " + containerImage)
|
||||
Expect(err).ToNot(HaveOccurred(), string(out))
|
||||
Expect(out).To(ContainSubstring("Upgrade completed"))
|
||||
Expect(out).To(ContainSubstring(containerImage))
|
||||
fmt.Println(out)
|
||||
} else {
|
||||
By(fmt.Sprintf("Upgrading to: %s", containerImage))
|
||||
out, err := vm.Sudo("kairos upgrade --force --image " + containerImage)
|
||||
Expect(err).ToNot(HaveOccurred(), string(out))
|
||||
Expect(out).To(ContainSubstring("Upgrade completed"))
|
||||
|
Loading…
Reference in New Issue
Block a user