Skip to content
Provides a Grails controller/view that display basic information about a deployed WAR file
Groovy CSS JavaScript
Find file
Latest commit 186d7e0 Apr 5, 2016 @rlovtangen rlovtangen Merge pull request #12 from kgeis/patch-1
Update _Events.groovy
Failed to load latest commit information.
docs/gapi
grails-app When returning json dont return arrays with name/values in them. Inst… Dec 4, 2014
scripts
test
.gitignore
BuildInfoGrailsPlugin.groovy
README.md
TODO.txt
application.properties
license.txt

README.md

Overview

Provides a controller(BuildInfoController)/view that displays basic information about the war file including:

  • date/time the war file was built
  • Source Control Revision Number (Git and Subversion)
  • application version number
  • grails version
  • grails environment (currently running, not necessarily the environment used to build the war file)
  • plugins installed (and which version)

The information can be viewed by opening index action of the controller i.e. www.your-app.com/buildInfo

Also please note that build information(i.e. date/time the war file was built and SCM version number) will be available only when you are building the application by creating war file and deploying it. It will not be available when you are building it through grails run-app.

If Hudson/Jenkins is used to build the war file the following Hudson environment variables are also displayed:

  • BUILD_NUMBER
  • BUILD_ID
  • BUILD_TAG
  • SVN_REVISION
  • GIT_COMMIT
  • GIT_BRANCH

Security

Note that the plugin does not apply any security restrictions to the BuildInfo controller - make sure to restrict access to this page if you do not want the information to be publicly available.

It can be easily restricted if you are using Spring Security. All that is needed, is to add static rules in Config.groovy. Here is the sample code to ensure that the url can be accessible only by users who have 'ADMIN' role: grails.plugin.springsecurity.controllerAnnotations.staticRules = [ '/buildInfo/**' : ['hasRole("ADMIN")'], ]

Changelog

1.2.5

  • Package name changed to grails.plugin.buildinfo. See issue #7

1.2.4

  • Subversion 1.7 support

1.2.3

1.2.2

1.2.1

1.1

1.0

Something went wrong with that request. Please try again.