Skip to content
a concourse-ci resource for building images via packer
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
bin
hooks
lib
scripts
test
.gitignore
.python-version
CHANGELOG
Dockerfile
LICENSE
README.md
TODO
hashicorp.asc
packer-versions
requirements-dev.txt
test.Dockerfile

README.md

concourse packer resource

a concourse-ci resource for building images via packer

table of contents

behaviour

check: not implemented

in: not implemented

out: build a new image

parameters

  • template: required. the path to the packer template file.

  • var_files: optional. the list of paths to external JSON variable file(s).

  • vars: optional. dict of explicit packer variable key/value pairs.

  • vars_from_files: optional. dict of vars and file paths to use as their value.

  • debug: optional. set to true to dump argument values and parsed output. may result in leaked credentials. default: false

the id of the first artifact produced will be used as the version, with the full artifact details in the output metadata

note: in an effort to prevent credentials leaking to logs, the full packer command line will not be printed on failure -- however, you should still mark any relevant variables as sensitive variables in the packer template to prevent packer from printing them in log output

the packer executable will have a working directory of the concourse input directory, so file paths can be relative to resources, or absolute paths

examples

resource_types:
- name: packer
  type: docker-image
  source:
    repository: snapkitchen/concourse-packer-resource

resources:
- name: build-ami
  type: packer

jobs:
- name: my-ami
  plan:
  - get: my-ami-template
  - put: build-ami
    params:
      template: my-ami-template/template.json
      var_files:
      - my-ami-template/my-vars.json
      vars:
        aws_access_key_id: ((aws_access_key_id))
        aws_secret_access_key: ((aws_secret_access_key))
        aws_region: ((aws_region))
      vars_from_files:
        commit_ref: my-ami-template/.git/short_ref

license

see LICENSE

You can’t perform that action at this time.