Skip to content

Instantly share code, notes, and snippets.

@tduffield
Created February 2, 2021 21:15
Show Gist options
  • Save tduffield/1ea519ecc89442f606a41f976d2cbc87 to your computer and use it in GitHub Desktop.
Save tduffield/1ea519ecc89442f606a41f976d2cbc87 to your computer and use it in GitHub Desktop.
❯ PACKER_LOG=1 packer build only-except.pkr.hcl
2021/02/02 15:15:39 [INFO] Packer version: 1.7.0-dev [go1.15.7 darwin amd64]
2021/02/02 15:15:39 [DEBUG] Discovered plugin: veertu-anka = /Users/tom/.packer.d/plugins/packer-plugin-veertu-anka
2021/02/02 15:15:39 found external [vm] builders from veertu-anka plugin
2021/02/02 15:15:39 found external [registry] post-processors from veertu-anka plugin
2021/02/02 15:15:39 Checking 'PACKER_CONFIG' for a config file path
2021/02/02 15:15:39 'PACKER_CONFIG' not set; checking the default config file path
2021/02/02 15:15:39 Attempting to open config file: /Users/tom/.packerconfig
2021/02/02 15:15:39 [WARN] Config file doesn't exist: /Users/tom/.packerconfig
2021/02/02 15:15:39 Setting cache directory: /Users/tom/code/chef/packer-debug/packer_cache
2021/02/02 15:15:39 Creating plugin client for path: /usr/local/bin/packer
2021/02/02 15:15:39 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-docker"}
2021/02/02 15:15:39 Waiting for RPC address for: /usr/local/bin/packer
2021/02/02 15:15:39 packer-builder-docker plugin: [INFO] Packer version: 1.7.0-dev [go1.15.7 darwin amd64]
2021/02/02 15:15:39 packer-builder-docker plugin: Checking 'PACKER_CONFIG' for a config file path
2021/02/02 15:15:39 packer-builder-docker plugin: 'PACKER_CONFIG' not set; checking the default config file path
2021/02/02 15:15:39 packer-builder-docker plugin: Attempting to open config file: /Users/tom/.packerconfig
2021/02/02 15:15:39 packer-builder-docker plugin: [WARN] Config file doesn't exist: /Users/tom/.packerconfig
2021/02/02 15:15:39 packer-builder-docker plugin: Setting cache directory: /Users/tom/code/chef/packer-debug/packer_cache
2021/02/02 15:15:39 packer-builder-docker plugin: args: []string{"packer-builder-docker"}
2021/02/02 15:15:39 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-plugin061441053
2021/02/02 15:15:39 packer-builder-docker plugin: Plugin address: unix /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-plugin061441053
2021/02/02 15:15:39 packer-builder-docker plugin: Waiting for connection...
2021/02/02 15:15:39 packer-builder-docker plugin: Serving a plugin connection...
2021/02/02 15:15:39 Creating plugin client for path: /usr/local/bin/packer
2021/02/02 15:15:39 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell"}
2021/02/02 15:15:39 Waiting for RPC address for: /usr/local/bin/packer
2021/02/02 15:15:39 packer-provisioner-shell plugin: [INFO] Packer version: 1.7.0-dev [go1.15.7 darwin amd64]
2021/02/02 15:15:39 packer-provisioner-shell plugin: Checking 'PACKER_CONFIG' for a config file path
2021/02/02 15:15:39 packer-provisioner-shell plugin: 'PACKER_CONFIG' not set; checking the default config file path
2021/02/02 15:15:39 packer-provisioner-shell plugin: Attempting to open config file: /Users/tom/.packerconfig
2021/02/02 15:15:39 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /Users/tom/.packerconfig
2021/02/02 15:15:39 packer-provisioner-shell plugin: Setting cache directory: /Users/tom/code/chef/packer-debug/packer_cache
2021/02/02 15:15:39 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2021/02/02 15:15:39 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-plugin266784257
2021/02/02 15:15:39 packer-provisioner-shell plugin: Plugin address: unix /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-plugin266784257
2021/02/02 15:15:39 packer-provisioner-shell plugin: Waiting for connection...
2021/02/02 15:15:39 packer-provisioner-shell plugin: Serving a plugin connection...
2021/02/02 15:15:39 Creating plugin client for path: /usr/local/bin/packer
2021/02/02 15:15:39 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-builder-docker"}
2021/02/02 15:15:39 Waiting for RPC address for: /usr/local/bin/packer
2021/02/02 15:15:39 packer-builder-docker plugin: [INFO] Packer version: 1.7.0-dev [go1.15.7 darwin amd64]
2021/02/02 15:15:39 packer-builder-docker plugin: Checking 'PACKER_CONFIG' for a config file path
2021/02/02 15:15:39 packer-builder-docker plugin: 'PACKER_CONFIG' not set; checking the default config file path
2021/02/02 15:15:39 packer-builder-docker plugin: Attempting to open config file: /Users/tom/.packerconfig
2021/02/02 15:15:39 packer-builder-docker plugin: [WARN] Config file doesn't exist: /Users/tom/.packerconfig
2021/02/02 15:15:39 packer-builder-docker plugin: Setting cache directory: /Users/tom/code/chef/packer-debug/packer_cache
2021/02/02 15:15:39 packer-builder-docker plugin: args: []string{"packer-builder-docker"}
2021/02/02 15:15:39 packer-builder-docker plugin: Plugin address: unix /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-plugin142874237
2021/02/02 15:15:39 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-plugin142874237
2021/02/02 15:15:39 packer-builder-docker plugin: Waiting for connection...
2021/02/02 15:15:39 packer-builder-docker plugin: Serving a plugin connection...
2021/02/02 15:15:39 Creating plugin client for path: /usr/local/bin/packer
2021/02/02 15:15:39 Starting plugin: /usr/local/bin/packer []string{"/usr/local/bin/packer", "plugin", "packer-provisioner-shell"}
2021/02/02 15:15:39 Waiting for RPC address for: /usr/local/bin/packer
2021/02/02 15:15:39 packer-provisioner-shell plugin: [INFO] Packer version: 1.7.0-dev [go1.15.7 darwin amd64]
2021/02/02 15:15:39 packer-provisioner-shell plugin: Checking 'PACKER_CONFIG' for a config file path
2021/02/02 15:15:39 packer-provisioner-shell plugin: 'PACKER_CONFIG' not set; checking the default config file path
2021/02/02 15:15:39 packer-provisioner-shell plugin: Attempting to open config file: /Users/tom/.packerconfig
2021/02/02 15:15:39 packer-provisioner-shell plugin: [WARN] Config file doesn't exist: /Users/tom/.packerconfig
2021/02/02 15:15:39 packer-provisioner-shell plugin: Setting cache directory: /Users/tom/code/chef/packer-debug/packer_cache
2021/02/02 15:15:39 packer-provisioner-shell plugin: args: []string{"packer-provisioner-shell"}
2021/02/02 15:15:39 packer-provisioner-shell plugin: Plugin address: unix /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-plugin757692681
2021/02/02 15:15:39 packer-provisioner-shell plugin: Waiting for connection...
2021/02/02 15:15:39 Received unix RPC address for /usr/local/bin/packer: addr is /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-plugin757692681
2021/02/02 15:15:39 packer-provisioner-shell plugin: Serving a plugin connection...
2021/02/02 15:15:39 Build debug mode: false
docker.positive: output will be in this color.
2021/02/02 15:15:39 Force build: false
2021/02/02 15:15:39 On error:
2021/02/02 15:15:39 Waiting on builds to complete...
2021/02/02 15:15:39 Starting build run: docker.negative
2021/02/02 15:15:39 Running builder:
2021/02/02 15:15:39 [INFO] (telemetry) Starting builder
docker.negative: output will be in this color.
2021/02/02 15:15:39 Starting build run: docker.positive
2021/02/02 15:15:39 Running builder:
2021/02/02 15:15:39 [INFO] (telemetry) Starting builder
2021/02/02 15:15:39 packer-builder-docker plugin: [DEBUG] Docker version: 20.0.0
2021/02/02 15:15:39 packer-builder-docker plugin: [DEBUG] Container will be committed
2021/02/02 15:15:39 packer-builder-docker plugin: [DEBUG] Docker version: 20.0.0
2021/02/02 15:15:39 packer-builder-docker plugin: [DEBUG] Container will be committed
2021/02/02 15:15:39 packer-builder-docker plugin: Set Packer temp dir to /Users/tom/.packer.d/tmp493133752
2021/02/02 15:15:39 packer-builder-docker plugin: Set Packer temp dir to /Users/tom/.packer.d/tmp255897304
==> docker.negative: Creating a temporary directory for sharing data...
2021/02/02 15:15:39 packer-builder-docker plugin: Executing: /usr/local/bin/docker [pull alpine]
2021/02/02 15:15:39 packer-builder-docker plugin: Executing: /usr/local/bin/docker [pull alpine]
==> docker.positive: Creating a temporary directory for sharing data...
==> docker.negative: Pulling Docker image: alpine
==> docker.positive: Pulling Docker image: alpine
docker.negative: Using default tag: latest
docker.positive: Using default tag: latest
docker.positive: latest: Pulling from library/alpine
docker.positive: Digest: sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930
docker.positive: Status: Image is up to date for alpine:latest
docker.positive: docker.io/library/alpine:latest
==> docker.positive: Starting docker container...
docker.positive: Run command: docker run -v /Users/tom/.packer.d/tmp255897304:/packer-files -d -i -t --entrypoint=/bin/sh -- alpine
2021/02/02 15:15:40 packer-builder-docker plugin: Starting container with args: [run -v /Users/tom/.packer.d/tmp255897304:/packer-files -d -i -t --entrypoint=/bin/sh -- alpine]
2021/02/02 15:15:40 packer-builder-docker plugin: Waiting for container to finish starting
docker.negative: latest: Pulling from library/alpine
docker.negative: Digest: sha256:08d6ca16c60fe7490c03d10dc339d9fd8ea67c6466dea8d558526b1330a85930
docker.negative: Status: Image is up to date for alpine:latest
docker.negative: docker.io/library/alpine:latest
==> docker.negative: Starting docker container...
docker.negative: Run command: docker run -v /Users/tom/.packer.d/tmp493133752:/packer-files -d -i -t --entrypoint=/bin/sh -- alpine
2021/02/02 15:15:40 packer-builder-docker plugin: Starting container with args: [run -v /Users/tom/.packer.d/tmp493133752:/packer-files -d -i -t --entrypoint=/bin/sh -- alpine]
2021/02/02 15:15:40 packer-builder-docker plugin: Waiting for container to finish starting
docker.positive: Container ID: 6a341bc49a6d548bee6ec1659dc3ce4a795f36807f0a043f364e7603e46ad259
==> docker.positive: Using docker communicator to connect: 172.17.0.3
docker.negative: Container ID: f7f696492d1c5c43d67c0798f2c4d025a637b7559315956601e7936f69cdce7f
==> docker.negative: Using docker communicator to connect: 172.17.0.4
2021/02/02 15:15:41 packer-builder-docker plugin: Running the provision hook
2021/02/02 15:15:41 [INFO] (telemetry) Starting provisioner shell
==> docker.positive: Provisioning with shell script: /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-shell734186348
2021/02/02 15:15:41 packer-provisioner-shell plugin: Opening /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-shell734186348 for reading
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] 34 bytes written for 'uploadData'
2021/02/02 15:15:41 [INFO] 34 bytes written for 'uploadData'
2021/02/02 15:15:41 packer-builder-docker plugin: Copying to /tmp/script_2619.sh on container 6a341bc49a6d548bee6ec1659dc3ce4a795f36807f0a043f364e7603e46ad259.
2021/02/02 15:15:41 packer-builder-docker plugin: Copied 34 bytes for /tmp/script_2619.sh
2021/02/02 15:15:41 packer-builder-docker plugin: Running the provision hook
2021/02/02 15:15:41 [INFO] (telemetry) Starting provisioner shell
==> docker.negative: Provisioning with shell script: /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-shell665679060
2021/02/02 15:15:41 packer-provisioner-shell plugin: Opening /var/folders/pk/4b61s3m93kv6nzbbgn80xrrh0000gp/T/packer-shell665679060 for reading
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] 34 bytes written for 'uploadData'
2021/02/02 15:15:41 [INFO] 34 bytes written for 'uploadData'
2021/02/02 15:15:41 packer-builder-docker plugin: Copying to /tmp/script_7328.sh on container f7f696492d1c5c43d67c0798f2c4d025a637b7559315956601e7936f69cdce7f.
2021/02/02 15:15:41 packer-builder-docker plugin: Copied 34 bytes for /tmp/script_7328.sh
2021/02/02 15:15:41 packer-builder-docker plugin: Executing docker exec -i 6a341bc49a6d548bee6ec1659dc3ce4a795f36807f0a043f364e7603e46ad259 /bin/sh -c (chmod 0755 /tmp/script_2619.sh):
2021/02/02 15:15:41 packer-builder-docker plugin: Executing docker exec -i f7f696492d1c5c43d67c0798f2c4d025a637b7559315956601e7936f69cdce7f /bin/sh -c (chmod 0755 /tmp/script_7328.sh):
2021/02/02 15:15:41 packer-builder-docker plugin: [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 packer-builder-docker plugin: Executing docker exec -i 6a341bc49a6d548bee6ec1659dc3ce4a795f36807f0a043f364e7603e46ad259 /bin/sh -c (chmod +x /tmp/script_2619.sh; PACKER_BUILDER_TYPE='docker' PACKER_BUILD_NAME='positive' /tmp/script_2619.sh):
2021/02/02 15:15:41 packer-builder-docker plugin: [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 packer-builder-docker plugin: Executing docker exec -i f7f696492d1c5c43d67c0798f2c4d025a637b7559315956601e7936f69cdce7f /bin/sh -c (chmod +x /tmp/script_7328.sh; PACKER_BUILDER_TYPE='docker' PACKER_BUILD_NAME='negative' /tmp/script_7328.sh):
docker.positive: Goodbye World
2021/02/02 15:15:41 packer-builder-docker plugin: [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] 14 bytes written for 'stdout'
2021/02/02 15:15:41 [INFO] 0 bytes written for 'stderr'
2021/02/02 15:15:41 [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] 0 bytes written for 'stderr'
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] 14 bytes written for 'stdout'
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 packer-builder-docker plugin: Executing docker exec -i 6a341bc49a6d548bee6ec1659dc3ce4a795f36807f0a043f364e7603e46ad259 /bin/sh -c (rm -f /tmp/script_2619.sh):
docker.negative: Goodbye World
2021/02/02 15:15:41 packer-builder-docker plugin: [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] 14 bytes written for 'stdout'
2021/02/02 15:15:41 [INFO] 0 bytes written for 'stderr'
2021/02/02 15:15:41 [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] 14 bytes written for 'stdout'
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] 0 bytes written for 'stderr'
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 packer-builder-docker plugin: Executing docker exec -i f7f696492d1c5c43d67c0798f2c4d025a637b7559315956601e7936f69cdce7f /bin/sh -c (rm -f /tmp/script_7328.sh):
2021/02/02 15:15:41 packer-builder-docker plugin: [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:41 packer-provisioner-shell plugin: [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:41 packer-builder-docker plugin: Executing docker exec -i 6a341bc49a6d548bee6ec1659dc3ce4a795f36807f0a043f364e7603e46ad259 /bin/sh -c (rm -f ):
2021/02/02 15:15:42 packer-builder-docker plugin: [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:42 [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:42 [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:42 packer-provisioner-shell plugin: [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:42 packer-builder-docker plugin: Executing docker exec -i f7f696492d1c5c43d67c0798f2c4d025a637b7559315956601e7936f69cdce7f /bin/sh -c (rm -f ):
2021/02/02 15:15:42 packer-builder-docker plugin: [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:42 [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:42 [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:42 packer-provisioner-shell plugin: [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:42 [INFO] (telemetry) ending shell
==> docker.positive: Committing the container
2021/02/02 15:15:42 packer-builder-docker plugin: Committing container with args: [commit 6a341bc49a6d548bee6ec1659dc3ce4a795f36807f0a043f364e7603e46ad259]
2021/02/02 15:15:42 packer-builder-docker plugin: [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:42 [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:42 [INFO] RPC endpoint: Communicator ended with: 0
2021/02/02 15:15:42 packer-provisioner-shell plugin: [INFO] RPC client: Communicator ended with: 0
2021/02/02 15:15:42 [INFO] (telemetry) ending shell
==> docker.negative: Committing the container
2021/02/02 15:15:42 packer-builder-docker plugin: Committing container with args: [commit f7f696492d1c5c43d67c0798f2c4d025a637b7559315956601e7936f69cdce7f]
docker.positive: Image ID: sha256:2bd79584c311fad491d692d754be2e5f6fc4c9b3b9a34499d6e4dd14108de852
==> docker.positive: Killing the container: 6a341bc49a6d548bee6ec1659dc3ce4a795f36807f0a043f364e7603e46ad259
docker.negative: Image ID: sha256:5b0e1e3359b782e1c8c46552722a2fca5a27d64a5db0038035f160101b82d6a8
==> docker.negative: Killing the container: f7f696492d1c5c43d67c0798f2c4d025a637b7559315956601e7936f69cdce7f
2021/02/02 15:15:42 [INFO] (telemetry) ending
Build 'docker.positive' finished after 2 seconds 693 milliseconds.
2021/02/02 15:15:42 [INFO] (telemetry) ending
==> Wait completed after 2 seconds 817 milliseconds
==> Builds finished. The artifacts of successful builds are:
2021/02/02 15:15:42 machine readable: docker.positive,artifact-count []string{"1"}
Build 'docker.negative' finished after 2 seconds 817 milliseconds.
==> Wait completed after 2 seconds 817 milliseconds
==> Builds finished. The artifacts of successful builds are:
2021/02/02 15:15:42 machine readable: docker.positive,artifact []string{"0", "builder-id", "packer.post-processor.docker-import"}
2021/02/02 15:15:42 machine readable: docker.positive,artifact []string{"0", "id", "sha256:2bd79584c311fad491d692d754be2e5f6fc4c9b3b9a34499d6e4dd14108de852"}
2021/02/02 15:15:42 machine readable: docker.positive,artifact []string{"0", "string", "Imported Docker image: sha256:2bd79584c311fad491d692d754be2e5f6fc4c9b3b9a34499d6e4dd14108de852"}
2021/02/02 15:15:42 machine readable: docker.positive,artifact []string{"0", "files-count", "0"}
2021/02/02 15:15:42 machine readable: docker.positive,artifact []string{"0", "end"}
2021/02/02 15:15:42 machine readable: docker.negative,artifact-count []string{"1"}
--> docker.positive: Imported Docker image: sha256:2bd79584c311fad491d692d754be2e5f6fc4c9b3b9a34499d6e4dd14108de852
2021/02/02 15:15:42 machine readable: docker.negative,artifact []string{"0", "builder-id", "packer.post-processor.docker-import"}
2021/02/02 15:15:42 machine readable: docker.negative,artifact []string{"0", "id", "sha256:5b0e1e3359b782e1c8c46552722a2fca5a27d64a5db0038035f160101b82d6a8"}
2021/02/02 15:15:42 machine readable: docker.negative,artifact []string{"0", "string", "Imported Docker image: sha256:5b0e1e3359b782e1c8c46552722a2fca5a27d64a5db0038035f160101b82d6a8"}
2021/02/02 15:15:42 machine readable: docker.negative,artifact []string{"0", "files-count", "0"}
2021/02/02 15:15:42 machine readable: docker.negative,artifact []string{"0", "end"}
--> docker.negative: Imported Docker image: sha256:5b0e1e3359b782e1c8c46552722a2fca5a27d64a5db0038035f160101b82d6a8
2021/02/02 15:15:42 [INFO] (telemetry) Finalizing.
2021/02/02 15:15:43 waiting for all plugin processes to complete...
2021/02/02 15:15:43 /usr/local/bin/packer: plugin process exited
2021/02/02 15:15:43 /usr/local/bin/packer: plugin process exited
2021/02/02 15:15:43 /usr/local/bin/packer: plugin process exited
2021/02/02 15:15:43 /usr/local/bin/packer: plugin process exited
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment