grim/local-pipelines

A ton of documentation updates

2016-07-26, Gary Kramlich
f3035c12a55e
Parents 34a698d6f0c9
Children 09b27a025683
A ton of documentation updates
  • +51 -19
    README.md
  • --- a/README.md Tue Jul 26 19:21:13 2016 -0500
    +++ b/README.md Tue Jul 26 19:57:18 2016 -0500
    @@ -1,37 +1,69 @@
    # Local Pipelines
    -Local Pipelines parses your bitbucket-pipelines.yml and runs it locally using
    -Docker.
    +Local Pipelines parses your `bitbucket-pipelines.yml` and runs it locally
    +using your local Docker instance. There is no build reporting aside from exit
    +status. It supports both [Mercurial](https://www.mercurial-scm.org/) and
    +[Git](https://git-scm.com/).
    -This supports mercurial and git.
    -
    -## Installing
    +## Installation
    -You can easily install it with a simple
    +local-pipelines can be easily installed from [pypi](https://pypi.python.org).
    +The following command will install local-pipelines locally for your user:
    -```
    -pip install -U --user local-pipelines
    -```
    + pip install -U --user local-pipelines
    -Once that's done make sure ~/.local/bin is in your $PATH.
    +Once installation is complete make sure that `~/.local/bin` is in your `$PATH`.
    ## Running
    -You can run your your bitbucket-pipelines.yml from the working directory via:
    +You can run your your `bitbucket-pipelines.yml` from the working directory with
    +the following command:
    +
    + pipelines
    +
    +If you want to run it from another directory you can use the `-f` argument to
    +specify the path to the file.
    -```
    -pipelines
    -```
    + pipelines -f /path/to/bitbucket-pipelines.yml
    +
    +### Environment Variables
    +
    +You can specify environment variables by using the `-e` or `--env` options on
    +the command line.
    +
    +You can also use `--env-file` to specify one or more files to load environment
    +variables from. These files will be evaluated in the order given and will
    +over write values that were set previously.
    -If you want to run it from another directory you can use
    +For example, you can ship a `common.env` which all includes settings common to
    +all members/users of your project. Then your members/users can override
    +settings in `common.env` or set sensitive settings by using another env file.
    +
    +#### Example
    +
    +##### common.env
    +
    + LOG_LEVEL=info
    + PORT=5000
    +
    +##### user.env
    -```
    -pipelines -f /path/to/bitbucket-pipelines.yml
    -```
    + DEBUG=true
    + LOG_LEVEL=debug
    +
    +You can then run the pipeline with
    +
    + pipelines --env-file=common.env --env-file=user.env
    +
    +The resulting will look like the following
    +
    + DEBUG=true
    + LOG_LEVEL=debug
    + PORT=5000
    ## TODO
    -The BITBUCKET_* environment variables and secure variables are not currently implemented.
    +The `BITBUCKET_*` environment variables and secure variables are not currently implemented.
    [[1]](https://confluence.atlassian.com/bitbucket/environment-variables-in-bitbucket-pipelines-794502608.html)
    ## Licensing