Gitcheck Plugin

  • Tags: git, gitcheck, deploy, war
  • Latest: 0.2.1
  • Last Updated: 26 July 2013
  • Grails version: 2.0 > *
0 vote
Dependency:
compile ":gitcheck:0.2.1"

 Documentation  Source  Issues

Summary

Provides the ability to check Git respository status, e.g. uncommited files, missing updates, etc. while creating a war file.

Installation

grails install-plugin gitcheck

Description

This plugin provides the ability to check git status of a local repository on war file generation.

It can be used to ensure your changes are committed and pushed as well as your project is current while generating a war file.

The following tests are performed:

  • Check for valid branch name
  • Check for uncommitted changes
  • Check for unpushed change sets
  • Check for unpulled origin change sets

Configuration

You can control the plugin behavior by the following configuration options (usually set in Config.groovy):
  • scm.validBranch - The valid branch name(s) for this build
  • scm.skipGitBranchCheck - If true, do not perform the Git branch check [false]
  • scm.skipGitCommitCheck - If true, do not perform uncommitted changes check. [false]
  • scm.skipGitPushedCheck - If true, do not perform unpushed change sets check. [false]
  • scm.skipGitOriginCheck - If true, perform origin unpulled change sets check. [false]
You can set the gitcheck properties as usual on a per-Environment base. Example:

scm.validBranch = 'master' // default branch

development { scm.skipGitCommitCheck = true scm.skipGitPushedCheck = true scm.skipGitOriginCheck = true }

ci { scm.validBranch = 'ci' }

testserver1 { scm.validBranch = 'deploy/testserver1' scm.skipGitPushedCheck = true // just an example }

production { scm.validBranch = 'deploy/production' }