b80882f3b8
This change ensures the deletion of the external envVarFile (use_env_var_file = true) occurs after all script files have been executed and deleted. Build results before change ``` > packer build build.pkr.hcl [~0] docker: output will be in this color. ==> docker: Creating a temporary directory for sharing data... ==> docker: Pulling Docker image: ubuntu:bionic docker: bionic: Pulling from library/ubuntu docker: Digest: sha256:8d31dad0c58f552e890d68bbfb735588b6b820a46e459672d96e585871acc110 docker: Status: Image is up to date for ubuntu:bionic docker: docker.io/library/ubuntu:bionic ==> docker: Starting docker container... docker: Run command: docker run -v /home/wilken/.packer.d/tmp476880774:/packer-files -d -i -t --entrypoint=/bin/sh -- ubuntu:bionic docker: Container ID: 812069b4d70746a6d4592a8f75c06867c6774b8b0bd81ade76eae7926a30f64b ==> docker: Using docker communicator to connect: 172.17.0.2 ==> docker: Provisioning with shell script: sample.sh docker: Sample Script docker: wilken is NotForSale! ==> docker: Provisioning with shell script: foobar.sh ==> docker: /bin/sh: 1: .: Can't open /tmp/varfile_2555.sh ==> docker: Provisioning step had errors: Running the cleanup provisioner, if present... ==> docker: Killing the container: 812069b4d70746a6d4592a8f75c06867c6774b8b0bd81ade76eae7926a30f64b Build 'docker' errored: Script exited with non-zero exit status: 2.Allowed exit codes are: [0] ==> Some builds didn't complete successfully and had errors: --> docker: Script exited with non-zero exit status: 2.Allowed exit codes are: [0] ==> Builds finished but no artifacts were created. ``` Build results after change ``` > packer build build.pkr.hcl docker: output will be in this color. ==> docker: Creating a temporary directory for sharing data... ==> docker: Pulling Docker image: ubuntu:bionic docker: bionic: Pulling from library/ubuntu docker: Digest: sha256:8d31dad0c58f552e890d68bbfb735588b6b820a46e459672d96e585871acc110 docker: Status: Image is up to date for ubuntu:bionic docker: docker.io/library/ubuntu:bionic ==> docker: Starting docker container... docker: Run command: docker run -v /home/wilken/.packer.d/tmp819845000:/packer-files -d -i -t --entrypoint=/bin/sh -- ubuntu:bionic docker: Container ID: d8ed9100ff5017379bfc0d80703b2b2d10c4104941663aa5ddbbf18f6dcf74a5 ==> docker: Using docker communicator to connect: 172.17.0.2 ==> docker: Provisioning with shell script: sample.sh docker: Sample Script docker: wilken is NotForSale! ==> docker: Provisioning with shell script: foobar.sh docker: FooBar Script docker: wilken is NotForSale! ==> docker: Committing the container docker: Image ID: sha256:a412e43f134431f2049a7d06d5d691aad3717d91dd2ee5e2575e05b89384a4b3 ==> docker: Killing the container: d8ed9100ff5017379bfc0d80703b2b2d10c4104941663aa5ddbbf18f6dcf74a5 Build 'docker' finished. ==> Builds finished. The artifacts of successful builds are: --> docker: Imported Docker image: sha256:a412e43f134431f2049a7d06d5d691aad3717d91dd2ee5e2575e05b89384a4b3 ``` |
||
---|---|---|
.. | ||
provisioner.go | ||
provisioner.hcl2spec.go | ||
provisioner_test.go | ||
unix_reader.go | ||
unix_reader_test.go |