From 216491725660b9b6db60ecb6efa26c6e62881e3e Mon Sep 17 00:00:00 2001 From: Jackson West Date: Fri, 13 Oct 2023 17:06:43 -0500 Subject: [PATCH] fixes image-builder home directory permissions (#2556) --- projects/kubernetes-sigs/image-builder/buildspecs/ami.yml | 4 ++++ projects/kubernetes-sigs/image-builder/buildspecs/ova.yml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/projects/kubernetes-sigs/image-builder/buildspecs/ami.yml b/projects/kubernetes-sigs/image-builder/buildspecs/ami.yml index d51bb791d0..f768bac7f2 100644 --- a/projects/kubernetes-sigs/image-builder/buildspecs/ami.yml +++ b/projects/kubernetes-sigs/image-builder/buildspecs/ami.yml @@ -9,6 +9,10 @@ env: GOPATH: "/home/imagebuilder/go" phases: + install: + run-as: root + commands: + - chown -R imagebuilder:imagebuilder /home/imagebuilder/.packer.d pre_build: commands: - git config --global credential.helper '!aws codecommit credential-helper $@' diff --git a/projects/kubernetes-sigs/image-builder/buildspecs/ova.yml b/projects/kubernetes-sigs/image-builder/buildspecs/ova.yml index 0fb68ff6ad..1e29214fdf 100644 --- a/projects/kubernetes-sigs/image-builder/buildspecs/ova.yml +++ b/projects/kubernetes-sigs/image-builder/buildspecs/ova.yml @@ -15,6 +15,10 @@ env: VSPHERE_CONNECTION_DATA: "vsphere_ci_beta_connection:vsphere_connection_data" phases: + install: + run-as: root + commands: + - chown -R imagebuilder:imagebuilder /home/imagebuilder/.packer.d pre_build: commands: - git config --global credential.helper '!aws codecommit credential-helper $@'