artifacts

command module
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2014 License: MIT Imports: 10 Imported by: 0

README

Travis CI Artifacts Uploader

A smart little Go app to help aid in uploading build artifacts.

Installation

There are pre-built binaries of the latest stable build for 64-bit Linux, OSX, and Windows available here via the following links. Please note that the tests run on 64-bit Linux.

There is also an install script for Linux and OSX that may be used like so:

curl -sL https://raw.githubusercontent.com/travis-ci/artifacts/master/install | bash

Usage

Once the binary is in your $PATH and has been made executable, you will have access to the help system via artifacts help (also available here).

S3 ENVIRONMENT COMPATIBILITY

In addition to the environmental variables listed above for defining the access key, secret, and bucket, some additional variables will also work.

environmental variables accepted for "key"
  1. ARTIFACTS_KEY
  2. ARTIFACTS_AWS_ACCESS_KEY
  3. AWS_ACCESS_KEY_ID
  4. AWS_ACCESS_KEY
environmental variables accepted for "secret"
  1. ARTIFACTS_SECRET
  2. ARTIFACTS_AWS_SECRET_KEY
  3. AWS_SECRET_ACCESS_KEY
  4. AWS_SECRET_KEY
environmental variables accepted for "bucket"
  1. ARTIFACTS_BUCKET
  2. ARTIFACTS_S3_BUCKET
EXAMPLES
Example: logs and coverage

In this case, the key and secret are passed as command line flags and the log/ and coverage/ directories are passed as positional path arguments:

artifacts upload \
  --key AKIT339AFIY655O3Q9DZ \
  --secret 48TmqyraUyJ7Efpegi6Lfd10yUskAMB0G2TtRCX1 \
  --bucket my-fancy-bucket \
  log/ coverage/

The same operation using environmental variables would look like this:

export ARTIFACTS_KEY="AKIT339AFIY655O3Q9DZ"
export ARTIFACTS_SECRET="48TmqyraUyJ7Efpegi6Lfd10yUskAMB0G2TtRCX1"
export ARTIFACTS_BUCKET="my-fancy-bucket"
export ARTIFACTS_PATHS="log/:coverage/"

artifacts upload
Example: untracked files

In order to upload all of the untracked files (according to git), one might do this:

artifacts upload \
  --key AKIT339AFIY655O3Q9DZ \
  --secret 48TmqyraUyJ7Efpegi6Lfd10yUskAMB0G2TtRCX1 \
  --bucket my-fancy-bucket \
  $(git ls-files -o)

The same operation using environmental variables would look like this:

export ARTIFACTS_KEY="AKIT339AFIY655O3Q9DZ"
export ARTIFACTS_SECRET="48TmqyraUyJ7Efpegi6Lfd10yUskAMB0G2TtRCX1"
export ARTIFACTS_BUCKET="my-fancy-bucket"
export ARTIFACTS_PATHS="$(git ls-files -o | tr "\n" ":")"

artifacts upload
Example: multiple target paths

Specifying one or more custom target path will override the default of artifacts/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER. Multiple target paths must be specified in ':'-delimited strings:

artifacts upload \
  --key AKIT339AFIY655O3Q9DZ \
  --secret 48TmqyraUyJ7Efpegi6Lfd10yUskAMB0G2TtRCX1 \
  --bucket my-fancy-bucket \
  --target-paths "artifacts/$TRAVIS_REPO_SLUG/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER:artifacts/$TRAVIS_REPO_SLUG/$TRAVIS_COMMIT" \
  $(git ls-files -o)

The same operation using environmental variables would look like this:

export ARTIFACTS_TARGET_PATHS="artifacts/$TRAVIS_REPO_SLUG/$TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER:artifacts/$TRAVIS_REPO_SLUG/$TRAVIS_COMMIT"
export ARTIFACTS_KEY="AKIT339AFIY655O3Q9DZ"
export ARTIFACTS_SECRET="48TmqyraUyJ7Efpegi6Lfd10yUskAMB0G2TtRCX1"
export ARTIFACTS_BUCKET="my-fancy-bucket"
export ARTIFACTS_PATHS="$(git ls-files -o | tr "\n" ":")"

artifacts upload

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL