项目作者: gtramontina

项目描述 :
An image for https://github.com/semantic-release/semantic-release
高级语言: Makefile
项目地址: git://github.com/gtramontina/docker-semantic-release.git
创建时间: 2018-01-04T10:50:14Z
项目社区:https://github.com/gtramontina/docker-semantic-release

开源协议:

下载



Docker Tags
Docker Latest Tag
Travis


Docker image for semantic-release


Running:

  1. $ docker run --rm gtramontina/semantic-release:<version>

Note: Because running semantic-release alone automatically runs the application, the default command in this image is --help. If you want to actually run semantic-release, run the above command with your set of arguments, or simply -- if no arguments are needed, like so:

  1. $ docker run --rm gtramontina/semantic-release:<version> --

Note 2: You’ll need to mount your git-based project in the container, as well as the necessary environment variables. The example below mounts the current directory as /app in the container and sets it as the working directory (-w). It also sets the required GH_TOKEN and NPM_TOKEN environment variables (because we’re using the default verification/publication settings).

  1. $ docker run --rm \
  2. -w /app \
  3. -v $(pwd):/app \
  4. -e GH_TOKEN=$GH_TOKEN \
  5. -e NPM_TOKEN=$NPM_TOKEN \
  6. gtramontina/semantic-release:<version>

Note 3: If you’re running semantic-release in Travis, AppVeyor or any other CI environment, remember to forward the relevant environment variables to your container. The following example forwards Travis’ variables:

  1. $ docker run --rm \
  2. -w /app \
  3. -v $(pwd):/app \
  4. -e GH_TOKEN=$GH_TOKEN \
  5. -e NPM_TOKEN=$NPM_TOKEN \
  6. -e TRAVIS_COMMIT=$TRAVIS_COMMIT \
  7. -e TRAVIS_BUILD_NUMBER=$TRAVIS_BUILD_NUMBER \
  8. -e TRAVIS_BRANCH=$TRAVIS_BRANCH \
  9. -e TRAVIS_JOB_NUMBER=$TRAVIS_JOB_NUMBER \
  10. -e TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST \
  11. -e TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG \
  12. -e TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR \
  13. gtramontina/semantic-release:<version>

At the time of this writing, semantic-release was making use of env-ci to detect CI environments. Take a look at the environment variables it uses for your CI so you can forward them to your container.


Developing:

  1. $ make build # Builds a new image
  2. $ make test # Runs/tests the image
  3. $ make push # Pushes the image up
  4. $ make clean # Removes any generated artifacts
  5. $ make clobber # Removes artifacts and generated images

🐳