Skip to content

Don't put artifacts in a build/ subdirectory #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deployer/steps.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func (d *Deployer) tmpRootFs() string {
}

func (d *Deployer) destination() string {
return d.Config.StateDir("build")
return d.Config.State
}

func (d *Deployer) isoFile() string {
Expand Down
2 changes: 1 addition & 1 deletion examples/airgap/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ docker run -v $PWD/config.yaml:/config.yaml \
--set "flavor=fedora" \
--set "repository=kairos-io/provider-kairos"

echo "Custom ISO ready at $PWD/build/build/kairos.iso.custom.iso"
echo "Custom ISO ready at $PWD/build/kairos.iso.custom.iso"
2 changes: 1 addition & 1 deletion examples/airgap/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ docker run -v $PWD/config.yaml:/config.yaml \
--cloud-config /config.yaml \
--set "state_dir=/tmp/auroraboot"

echo "Custom ISO ready at $PWD/build/build/kairos.iso"
echo "Custom ISO ready at $PWD/build/kairos.iso"
4 changes: 2 additions & 2 deletions tests/e2e/arm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var _ = Describe("ARM image generation", Label("arm"), func() {
Expect(out).To(ContainSubstring("done"), out)
Expect(out).To(ContainSubstring("build-arm-image"), out)
Expect(err).ToNot(HaveOccurred())
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.img"))
_, err = os.Stat(filepath.Join(tempDir, "build/disk.img"))
Expect(err).ToNot(HaveOccurred())
})

Expand All @@ -60,7 +60,7 @@ var _ = Describe("ARM image generation", Label("arm"), func() {
Expect(out).ToNot(ContainSubstring("build-arm-image"), out)
Expect(out).To(ContainSubstring("prepare_arm"), out)
Expect(err).ToNot(HaveOccurred())
_, err = os.Stat(filepath.Join(tempDir, "build/build/efi.img"))
_, err = os.Stat(filepath.Join(tempDir, "build/efi.img"))
Expect(err).ToNot(HaveOccurred())
})
})
Expand Down
18 changes: 9 additions & 9 deletions tests/e2e/disks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ var _ = Describe("Disk image generation", Label("raw-disks"), func() {
Expect(out).To(ContainSubstring("extract-squashfs"), out)
Expect(out).ToNot(ContainSubstring("dump-source"), out)
Expect(err).ToNot(HaveOccurred(), out)
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw"))
_, err = os.Stat(filepath.Join(tempDir, "build/disk.raw"))
Expect(err).ToNot(HaveOccurred())
})

Expand All @@ -67,7 +67,7 @@ var _ = Describe("Disk image generation", Label("raw-disks"), func() {
Expect(out).To(ContainSubstring("extract-squashfs"), out)
Expect(out).ToNot(ContainSubstring("dump-source"), out)
Expect(err).ToNot(HaveOccurred(), out)
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.gce"))
_, err = os.Stat(filepath.Join(tempDir, "build/disk.raw.gce"))
Expect(err).ToNot(HaveOccurred())
})

Expand All @@ -89,7 +89,7 @@ var _ = Describe("Disk image generation", Label("raw-disks"), func() {
Expect(out).To(ContainSubstring("extract-squashfs"), out)
Expect(out).ToNot(ContainSubstring("dump-source"), out)
Expect(err).ToNot(HaveOccurred(), out)
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.vhd"))
_, err = os.Stat(filepath.Join(tempDir, "build/disk.raw.vhd"))
Expect(err).ToNot(HaveOccurred())
})

Expand All @@ -111,7 +111,7 @@ var _ = Describe("Disk image generation", Label("raw-disks"), func() {
// Expect(out).To(ContainSubstring("extract-squashfs"), out)
// Expect(out).ToNot(ContainSubstring("dump-source"), out)
// Expect(err).ToNot(HaveOccurred(), out)
// _, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.gce"))
// _, err = os.Stat(filepath.Join(tempDir, "build/disk.raw.gce"))
// Expect(err).ToNot(HaveOccurred())
// })
})
Expand Down Expand Up @@ -170,7 +170,7 @@ stages:
os.RemoveAll(tempDir)
})

It("generate a raw build/build/disk.raw (EFI) file", Label("efi"), func() {
It("generate a raw build/disk.raw (EFI) file", Label("efi"), func() {
image := "quay.io/kairos/opensuse:tumbleweed-core-amd64-generic-v3.2.1"
_, err := PullImage(image)
Expect(err).ToNot(HaveOccurred())
Expand All @@ -186,7 +186,7 @@ stages:
Expect(out).To(ContainSubstring("gen-raw-disk"), out)
Expect(out).To(ContainSubstring("dump-source"), out)
Expect(err).ToNot(HaveOccurred(), out)
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw"))
_, err = os.Stat(filepath.Join(tempDir, "build/disk.raw"))
Expect(err).ToNot(HaveOccurred())
})

Expand All @@ -207,7 +207,7 @@ stages:
Expect(out).To(ContainSubstring("convert-gce"), out)
Expect(out).To(ContainSubstring("dump-source"), out)
Expect(err).ToNot(HaveOccurred(), out)
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.gce"))
_, err = os.Stat(filepath.Join(tempDir, "build/disk.raw.gce"))
Expect(err).ToNot(HaveOccurred())
})

Expand All @@ -228,7 +228,7 @@ stages:
Expect(out).To(ContainSubstring("convert-vhd"), out)
Expect(out).To(ContainSubstring("dump-source"), out)
Expect(err).ToNot(HaveOccurred(), out)
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw.vhd"))
_, err = os.Stat(filepath.Join(tempDir, "build/disk.raw.vhd"))
Expect(err).ToNot(HaveOccurred())
})

Expand All @@ -249,7 +249,7 @@ stages:
Expect(out).To(ContainSubstring("gen-raw-mbr-disk"), out)
Expect(out).To(ContainSubstring("dump-source"), out)
Expect(err).ToNot(HaveOccurred(), out)
_, err = os.Stat(filepath.Join(tempDir, "build/build/disk.raw"))
_, err = os.Stat(filepath.Join(tempDir, "build/disk.raw"))
Expect(err).ToNot(HaveOccurred())
})
})
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/iso_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var _ = Describe("ISO image generation", Label("iso"), func() {
Expect(out).To(ContainSubstring("gen-iso"), out)
Expect(out).ToNot(ContainSubstring("build-arm-image"), out)
Expect(err).ToNot(HaveOccurred())
_, err = os.Stat(filepath.Join(tempDir, "build/build/kairos.iso"))
_, err = os.Stat(filepath.Join(tempDir, "build/kairos.iso"))
Expect(err).ToNot(HaveOccurred())
})

Expand Down Expand Up @@ -75,7 +75,7 @@ var _ = Describe("ISO image generation", Label("iso"), func() {
Expect(out).To(ContainSubstring("inject-cloud-config"), out)
Expect(out).ToNot(ContainSubstring("build-arm-image"), out)
Expect(err).ToNot(HaveOccurred())
_, err = os.Stat(filepath.Join(tempDir, "build/build/kairos.iso.custom.iso"))
_, err = os.Stat(filepath.Join(tempDir, "build/kairos.iso.custom.iso"))
Expect(err).ToNot(HaveOccurred())
})
})
Expand Down
Loading