CLI to upload application code to Atlas.
Go Shell Makefile
Latest commit 3b02d8c Sep 21, 2016 @sethvargo sethvargo committed on GitHub Merge pull request #20 from hashicorp/sethvargo/deps
Vendor dependencies

README.md

Atlas Upload CLI

Latest Version Build Status Go Documentation

The Atlas Upload CLI is a lightweight command line interface for uploading application code to Atlas to kick off deployment processes. This is the CLI used to power the vagrant push command and other parts of Atlas Go with the Atlas strategy.

It can also be downloaded and used externally with other systems (such as a CI service like Jenkins or Travis CI) to initiate Atlas-based deploys.

Usage

atlas-upload [options] slug path

  Upload application code or artifacts to Atlas for initiating deployments.

  "slug" is the name of the <username>/<application_name> to upload to within Atlas.

  If path is a directory, it will be compressed (gzip tar) and uploaded
  in its entirety. The root of the archive will be the path. For clarity:
  if you upload the "foo/" directory, then the file "foo/version" will be
  "version" in the archive since "foo/" is the root.

  A path must be specified. Due to the nature of this application, it does
  not default to using the current working directory automatically.

Options:

  -exclude=<path>     Glob pattern of files or directories to exclude (this may
                      be specified multiple times)
  -include=<path>     Glob pattern of files/directories to include (this may be
                      specified multiple times, any excludes will override
                      conflicting includes)
  -address=<url>      The address of the Atlas server
  -token=<token>      The Atlas API token
  -vcs                Get lists of files to exclude and include from a version
                      control system (Git, Mercurial or Subversion)
  -metadata<k=v>      Arbitrary key-value (string) metadata to be sent with the
                      upload; may be specified multiple times

  -debug              Turn on debug output
  -version            Print the version of this application

FAQ

Q: Can I specify my Atlas access token via an environment variable?
A: All of HashiCorp's products support the ATLAS_TOKEN environment variable. You can set this value in your shell profile or securely in your environment and it will be used.

Contributing

To hack on the Atlas Upload CLI, you will need a modern Go environment. To compile the atlas-upload binary and run the test suite, simply execute:

$ make

This will compile the atlas-upload binary into bin/atlas-upload and run the test suite.

If you just want to run the tests:

$ make test

Or to run a specific test in the suite:

go test ./... -run SomeTestFunction_name

Submit Pull Requests and Issues to the Atlas Upload CLI project on GitHub.