-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7718 from QiWang19/sign-multi-arch
Sign multi-arch images
- Loading branch information
Showing
5 changed files
with
70 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package integration | ||
|
||
import ( | ||
"io/ioutil" | ||
"os" | ||
"os/exec" | ||
"path/filepath" | ||
|
@@ -58,4 +59,19 @@ var _ = Describe("Podman image sign", func() { | |
_, err = os.Stat(filepath.Join(sigDir, "library")) | ||
Expect(err).To(BeNil()) | ||
}) | ||
|
||
It("podman sign --all multi-arch image", func() { | ||
cmd := exec.Command("gpg", "--import", "sign/secret-key.asc") | ||
err := cmd.Run() | ||
Expect(err).To(BeNil()) | ||
sigDir := filepath.Join(podmanTest.TempDir, "test-sign-multi") | ||
err = os.MkdirAll(sigDir, os.ModePerm) | ||
Expect(err).To(BeNil()) | ||
session := podmanTest.Podman([]string{"image", "sign", "--all", "--directory", sigDir, "--sign-by", "[email protected]", "docker://library/alpine"}) | ||
session.WaitWithDefaultTimeout() | ||
Expect(session.ExitCode()).To(Equal(0)) | ||
fInfos, err := ioutil.ReadDir(filepath.Join(sigDir, "library")) | ||
Expect(err).To(BeNil()) | ||
Expect(len(fInfos) > 1).To(BeTrue()) | ||
}) | ||
}) |