github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/enterprise/packer/builds/starting.html.md (about)

     1  ---
     2  layout: "enterprise"
     3  page_title: "Starting - Packer Builds - Terraform Enterprise"
     4  sidebar_current: "docs-enterprise-packerbuilds-starting"
     5  description: |-
     6    Packer builds can be started in Terraform Enterprise in two ways. This post is about how.
     7  ---
     8  
     9  # Starting Packer Builds in Terraform Enterprise
    10  
    11  Packer builds can be started in in two ways: `packer push` to upload the
    12  template and directory or via a GitHub connection that retrieves the contents of
    13  a repository after changes to the default branch (usually master).
    14  
    15  ### Packer Push
    16  
    17  Packer `push` is a
    18  [Packer command](https://packer.io/docs/command-line/push.html) that packages
    19  and uploads a Packer template and directory. This then creates a build which
    20  performs `packer build` against the uploaded template and packaged directory.
    21  
    22  The directory is included in order to run any associated provisioners, builds or
    23  post-processors that all might use local files. For example, a shell script or
    24  set of Puppet modules used in a Packer build needs to be part of the upload for
    25  Packer to be run remotely.
    26  
    27  By default, everything in your directory is uploaded as part of the push.
    28  
    29  However, it's not always the case that the entire directory should be uploaded.
    30  Often, temporary or cache directories and files like `.git`, `.tmp` will be
    31  included by default. This can cause builds to fail at certain sizes and should
    32  be avoided. You can specify
    33  [exclusions](https://packer.io/docs/templates/push.html#exclude) to avoid this
    34  situation.
    35  
    36  Packer also allows for a
    37  [VCS option](https://packer.io/docs/templates/push.html#vcs) that will detect
    38  your VCS (if there is one) and only upload the files that are tracked by the
    39  VCS. This is useful for automatically excluding ignored files. In a VCS like
    40  git, this basically does a `git ls-files`.
    41  
    42  
    43  ### GitHub Webhooks
    44  
    45  Optionally, GitHub can be used to import Packer templates and configurations.
    46  When used within an organization, this can be extremely valuable for keeping
    47  differences in environments and last mile changes from occurring before an
    48  upload.
    49  
    50  After you have [connected your GitHub account](/docs/enterprise/vcs/github.html) to Terraform Enterprise,
    51  you can connect your [Build Configuration](/docs/enterprise/glossary#build-configuration)
    52  to the target GitHub repository. The GitHub repository will be linked to the
    53  Packer configuration, and GitHub will start sending webhooks.
    54  Certain GitHub webhook events, detailed below, will cause the repository to be
    55  automatically ingressed into Terraform Enterprise and stored, along with references to the
    56  GitHub commits and authorship information.
    57  
    58  After each ingress the configuration will automatically build.
    59  
    60  You can disable an ingress by adding the text `[atlas skip]` or `[ci skip]` to
    61  your commit message.
    62  
    63  Supported GitHub webhook events:
    64  
    65  - push (on by default)
    66    - ingress when a tag is created
    67    - ingress when the default branch is updated
    68      - note: the default branch is either configured on your configuration's
    69        integrations tab in Terraform Enterprise, or if that is blank it is the GitHub
    70        repository's default branch
    71  - create (off by default)
    72    - ingress when a tag is created
    73    - note: if you want to only run on tag creation, turn on create events and
    74      turn off push events