WTBuildHelpersGem

This is a set of scripts for multiple platforms to help with building and testing tasks specific to WillowTree's pipelines and integrations.

All commands are run with the wtbuild command. If you need help on a specific command, run wtbuild help [command]

JIRA

jira_update_from_build

Updates any jira tickets based on the supplied git commit range.

Environment Variables

  • JIRA_URL - Base url for JIRA
  • JIRA_USERNAME - Username for accessing JIRA
  • JIRA_PASSWORD - Password for accessing JIRA
  • Supplied by Travis-CI:
    • TRAVIS_COMMIT_RANGE - range of commits to update
    • TRAVIS_BUILD_NUMBER - build number
  • Supplied by TeamCity
    • BUILD_NUMBER - build number
    • TRAMCITY_COMMIT_RANGE - created by teamcity_fetch_git_range

Command Line Usage:

$ wtbuild jira_update_from_build

TeamCity

teamcity_fetch_git_range

Fetches the last good build from the TeamCity server and uses that to produce the a git commit range.

Command Line Usage (when run as its own TeamCity build step):

$ wtbuild teamcity_fetch_git_range --url "%teamcity.serverUrl%" --build_type "%system.teamcity.buildType.id%" --username "%system.teamcity.auth.userId%" --password "%system.teamcity.auth.password%"`

Command Line Usage (when run as part of a larger build step):

$ export TEAMCITY_COMMIT_RANGE=`wtbuild teamcity_fetch_git_range --url "%teamcity.serverUrl%" --build_type "%system.teamcity.buildType.id%" --username "%system.teamcity.auth.userId%" --password "%system.teamcity.auth.password%" --export`

Installation

Add this line to your application's Gemfile:

gem 'WTBuildHelpersGem'

And then execute:

$ bundle

Or install it yourself as:

$ gem install WTBuildHelpersGem

Usage

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bin/console for an interactive prompt that will allow you to experiment.