GithubHelp home page GithubHelp logo

step-setup-go-workspace's Introduction

setup-go-workspace

Move your code from the working directory into the $GOPATH. Introspection is done via environment variables, to determine the git provider host, owner, and repository name. You are able to overwrite this path using a option.

Options

  • package-dir (optional) The path inside $GOPATH/src to use. If left empty, the step will use the environment variables to figure out where to put the code.
  • gopath (optional, default: $GOPATH) This should contain a path to the workspace where the code should be installed. Use this when $GOPATH contains multiple directories.

Example

Setup a Go workspace using environment variables to figure out the path:

build:
    steps:
        - wercker/setup-go-workspace

Setup a Go workspace using a fixed path:

build:
    steps:
        - wercker/setup-go-workspace:
            package-dir: github.com/wercker/setup-go-workspace

Known issues

Doesn't work in Single-player mode

Currently the wercker cli does not inject the git details as environment variables. You can either set the package-dir option to a fixed value. Or you can pass the git details to the wercker cli using the following flags: --git-domain, --git-owner, and --git-repository (see wercker build --help).

Changes made during build are not present during a deploy

Currently this step will copy all content from $WERCKER_SOURCE_DIR to a directory inside the $GOPATH. It will also change $WERCKER_SOURCE_DIR to point to this new directory. This will ensure that any steps run after this step will be run in the $GOPATH. The store step however will still look at the original $WERCKER_SOURCE_DIR path. So any changes will not be persisted.

The recommended workaround is to put your artifacts in the $WERCKER_OUTPUT_DIR directory. This will ensure that only the files you pick are available during a deploy.

License

The MIT License (MIT)

Changelog

1.2.1

  • Fix bug where the original folder was deleted.

1.2.0

  • Remove rsync dependency

1.0.4

  • Initial release

step-setup-go-workspace's People

Contributors

gilbode avatar hatchan avatar nimajalali avatar pjvds 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.