Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

wparad/ci-build-tools.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Build Tools

Node NPM build tools library.

npm version Build Status

Support:

  • Travis-CI
  • JenkinsCI (Stash integration environment variables)

Usage

var ci = require('ci-build-tools')(process.env.GIT_TAG_PUSHER);

//Get the current version based on the branch name:
var version = ci.GetVersion();

//Automatically publish a tag with the current version to the git repository.
ci.PublishGitTag();

//Or
ci.PublishGitTag('tag-name.1.0.0-sha1');

//Automatically merge downstream branches (`release/*` or `master`) if the current branch is `release`.
ci.MergeDownstream('release/', 'master');

Development

  • Get Node:
    • curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
    • nvm install [version]
    • npm install ci-build-tools

For Travis Integration

Update .travis.yml keys (replacing git_api_key and deployment_key)

  • apt-get install ruby-dev
  • gem install travis
  • Setup Travis-CI build on the repository.
  • (replace git_api_key with the key): travis encrypt --add env.global GIT_TAG_PUSHER=git_api_key
    • Create a Github api access key with the following access:
      • repo_deployment
      • public_repo
  • (replace deployment_key with the key): travis encrypt --add deploy.api_key deployment_key

About

Tools to reduce layer integration between build tasks and CI implementation

Resources

License

Stars

Watchers

Forks

Packages

No packages published