Project

test-drive

0.0
No commit activity in last 3 years
No release in over 3 years
A simple command-line tool for running a Jenkins test job before pushing code to the remote repo
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.6
~> 1.7
~> 10.0
~> 4.2
~> 3.2

Runtime

 Project Readme

Test::Drive

Gem Version Build Status Dependency Status Code Climate Coverage Status

A simple command-line tool for running a Jenkins test job before pushing code to a remote repo

Installation

$ gem install test-drive

Usage

$ test-drive -h

Usage: test-drive [options]

A simple command-line tool for running a Jenkins test job before pushing code to a remote repo

v0.0.3

Options:
    -h, --help                       Show command line help
    -s, --server JENKINS_URL         URL for the Jenkins server
    -u, --user USER                  Jenkins user ID
    -p, --password API_KEY           Jenkins password or API token
    -j, --job TARGET_JOB             Jenkins job to be triggered
    -n, --[no-]push                  Option to enable (or suppress) pushing to the remote repo
        --version                    Show help/version info
        --log-level LEVEL            Set the logging level
                                     (debug|info|warn|error|fatal)
                                     (Default: info)

Default values can be placed in ~/.test-drive.yml

Jenkins Config

This app assumes that you have a Jenkins job already configured as follows:

  • It takes a file parameter called 'patch'
  • It pulls your source code from origin/master and executes a shell command that runs
    echo "" >> ${WORKSPACE}/patch
    git apply ${WORKSPACE}/patch
  • It then executes your desired test suite and runs
    git apply --reverse ${WORKSPACE}/patch

to teardown (optional but recommended)

Local Config

On first run, you will have the option of saving your Jenkins credentials to a config file at ~/.test-drive.yml. This file may be edited to include any of the allowed options as defaults.

---
server: https://jenkins.your_org.com/
user: user@your_org.com
password: xxxxxxxxxxxxxxxxxxxxxxxxx
job: YourDefaultJob
push: false

Contributing

  1. Fork it ( https://github.com/[my-github-username]/test-drive/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request