---
description: Alpine-based Worker Docker image for Travis CI
variables:
  docker_repository: "quay.io/travisci/worker"
  travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}"
  travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}"
  travis_worker_version: "{{ env `TRAVIS_WORKER_VERSION` }}"
builders:
- type: docker
  name: docker
  image: "alpine:3.4"
  run_command:
  - -d
  - -i
  - -t
  - "{{.Image}}"
  - sh
  commit: true
provisioners:
- type: shell
  inline: apk add --no-cache --virtual=.build-deps bash curl
- type: shell
  scripts:
  - packer-scripts/travis-worker-download
  environment_vars:
  - TRAVIS_WORKER_VERSION={{ user `travis_worker_version` }}
- type: shell
  inline: apk del .build-deps
post-processors:
-
  - type: docker-tag
    repository: "{{ user `docker_repository` }}"
    tag: "{{ user `travis_worker_version` }}"
  - type: artifice
    files:
    - tmp/docker-meta/.dumped
  - type: shell-local
    scripts:
    - bin/docker-push
    environment_vars:
    - "DOCKER_DEST={{ user `docker_repository` }}:{{ user `travis_worker_version` }}"
    - "DOCKER_CREDS=quay"

---
description: Alpine-based Worker Docker image for Travis CI
variables:
  docker_repository: "quay.io/travisci/worker"
  travis_cookbooks_branch: "{{ env `TRAVIS_COOKBOOKS_BRANCH` }}"
  travis_cookbooks_sha: "{{ env `TRAVIS_COOKBOOKS_SHA` }}"
  travis_worker_version: "{{ env `TRAVIS_WORKER_VERSION` }}"
builders:
- type: docker
  name: docker
  image: "alpine:3.4"
  run_command:
  - -d
  - -i
  - -t
  - "{{.Image}}"
  - sh
  commit: true
provisioners:
- type: shell
  inline:
  - apk add --no-cache ca-certificates
  - apk add --no-cache --virtual=.build-deps bash curl
- type: shell
  scripts:
  - packer-scripts/travis-worker-download
  environment_vars:
  - TRAVIS_WORKER_VERSION={{ user `travis_worker_version` }}
- type: shell
  inline: apk del .build-deps
post-processors:
-
  - type: docker-tag
    repository: "{{ user `docker_repository` }}"
    tag: "{{ user `travis_worker_version` }}"
  - type: artifice
    files:
    - tmp/docker-meta/.dumped
  - type: shell-local
    scripts:
    - bin/docker-push
    environment_vars:
    - "DOCKER_DEST={{ user `docker_repository` }}:{{ user `travis_worker_version` }}"
    - "DOCKER_CREDS=quay"

Add ca-certificates to the worker alpine image
Add ca-certificates to the worker alpine image

as root certs are needed in order to authenticate with GCE
