diff options
author | Brent Baude <bbaude@redhat.com> | 2021-08-10 08:10:56 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2021-08-18 09:55:24 -0500 |
commit | cd40c875ac51b32f7b4e5479d02faee14e0ab12d (patch) | |
tree | 403914c909beea71186002553e09006e08ae2953 /test/e2e/common_test.go | |
parent | a3d8b48fd56a722642f7cbcad52b2fa88f12b656 (diff) | |
download | podman-cd40c875ac51b32f7b4e5479d02faee14e0ab12d.tar.gz podman-cd40c875ac51b32f7b4e5479d02faee14e0ab12d.tar.bz2 podman-cd40c875ac51b32f7b4e5479d02faee14e0ab12d.zip |
Add ability to build images in play kube
When playing a kube YAML file, it can be desirable to be able to build
an image on the fly. This is good for development of an image and YAML
files and somewhat mocks what compose does.
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e/common_test.go')
-rw-r--r-- | test/e2e/common_test.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go index 2e48e1763..eb4bd102b 100644 --- a/test/e2e/common_test.go +++ b/test/e2e/common_test.go @@ -841,3 +841,18 @@ func (p *PodmanTestIntegration) buildImage(dockerfile, imageName string, layers output := session.OutputToStringArray() return output[len(output)-1] } + +func writeYaml(content string, fileName string) error { + f, err := os.Create(fileName) + if err != nil { + return err + } + defer f.Close() + + _, err = f.WriteString(content) + if err != nil { + return err + } + + return nil +} |