Giter Site home page Giter Site logo

artifacts's Introduction

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 environment variables listed above for defining the access key, secret, and bucket, some additional variables will also work.

environment variables accepted for "key"

  1. ARTIFACTS_KEY
  2. ARTIFACTS_AWS_ACCESS_KEY
  3. AWS_ACCESS_KEY_ID
  4. AWS_ACCESS_KEY

environment variables accepted for "secret"

  1. ARTIFACTS_SECRET
  2. ARTIFACTS_AWS_SECRET_KEY
  3. AWS_SECRET_ACCESS_KEY
  4. AWS_SECRET_KEY

environment variables accepted for "bucket"

  1. ARTIFACTS_BUCKET
  2. ARTIFACTS_S3_BUCKET

environment variables accepted for "region"

  1. ARTIFACTS_REGION
  2. ARTIFACTS_S3_REGION

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 environment 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 environment 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 environment 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

artifacts's People

Contributors

banzaiman avatar emdantrim avatar joepvd avatar joshk avatar meatballhat avatar sarahhodne avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.