Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-3741

allow setting arbitrary system properties

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: grails-plugin
    • Labels:
      None
    • Environment:
      Platform: All, OS: All
    • Similar Issues:

      Description

      The plugin should provide an input field for setting arbitrary additional
      system properties, just like for example the ant build does.

      Currently it is not possible to set system properties except for
      grails.work.dir, project.work.dir and server.port. There are many other
      interesting properties that users might need, including user-defined
      properties.

      Specifying -D options as target options does not work either: Using "-Dprop=foo
      war" as target (with the quotes) generates an error about missing target, and
      "war -Dprop=foo" treats the -D option as a target option and has no effect.

      With the general feature, the three properties mentioned above would no longer
      require separate input fields (which are left blank for most builds anyway).
      This is clearly a more scalable solution.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -
                • Issue 3740 has been marked as a duplicate of this issue. ***
            Show
            jglick Jesse Glick added a comment - Issue 3740 has been marked as a duplicate of this issue. ***
            Hide
            mbetter Marcus Better added a comment -

            Created an attachment (id=716)
            proposed patch

            Show
            mbetter Marcus Better added a comment - Created an attachment (id=716) proposed patch
            Hide
            kaaloo kaaloo added a comment -

            It would be great to get this patch in. It's stopping me from using custom
            grails environments to differentiate from staging and production builds.

            Show
            kaaloo kaaloo added a comment - It would be great to get this patch in. It's stopping me from using custom grails environments to differentiate from staging and production builds.
            Hide
            tvinke tvinke added a comment -

            I justed gave all my 10 votes to this issue - it's essential for custom
            environments to have "-Dgrails.env" passed through correctly and right now I
            can't use this plugin real smooth for more complex setups.

            Jeff, as assignee, can you give an estimate for this one?

            Show
            tvinke tvinke added a comment - I justed gave all my 10 votes to this issue - it's essential for custom environments to have "-Dgrails.env" passed through correctly and right now I can't use this plugin real smooth for more complex setups. Jeff, as assignee, can you give an estimate for this one?
            Hide
            jeffg2one jeffg2one added a comment -

            Fixed in 1.0.5

            Show
            jeffg2one jeffg2one added a comment - Fixed in 1.0.5
            Hide
            ogourment2 ogourment2 added a comment -

            Could you please provide additional information about this issue, ie: what
            syntax is supported?
            We have upgraded the plugin to version 1.0.5, restarted Hudson and am not
            getting the grails.env variable recognized by grails.

            Note: the example below uses grails.env with the test environment, which can be
            specified in another way (grails test target...), but it's for testing purposes...

            [test-atm-utils] $
            /home/hudson/.hudson/ATM/001-ThirdParty/Codehaus/grails/grails-1.2-M3/bin/grails
            deploy-remote --non-interactive -Dgrails.env=test
            Welcome to Grails 1.2-M3 - http://grails.org/
            Licensed under Apache Standard License 2.0
            Grails home is set to:
            /home/hudson/.hudson/ATM/001-ThirdParty/Codehaus/grails/grails-1.2-M3

            Base Directory:
            /home/hudson2/.hudson/jobs/GrailsAtmUtilsTest/workspace/000-Common/04-ATMGrails/test-atm-utils
            Resolving dependencies...
            Dependencies resolved in 10450ms.
            Running script
            /home/hudson2/.hudson/jobs/GrailsAtmUtilsTest/workspace/000-Common/04-ATMGrails/test-atm-utils/../atm-utils/scripts/DeployRemote.groovy
            Environment set to development

            Show
            ogourment2 ogourment2 added a comment - Could you please provide additional information about this issue, ie: what syntax is supported? We have upgraded the plugin to version 1.0.5, restarted Hudson and am not getting the grails.env variable recognized by grails. Note: the example below uses grails.env with the test environment, which can be specified in another way (grails test target...), but it's for testing purposes... [test-atm-utils] $ /home/hudson/.hudson/ATM/001-ThirdParty/Codehaus/grails/grails-1.2-M3/bin/grails deploy-remote --non-interactive -Dgrails.env=test Welcome to Grails 1.2-M3 - http://grails.org/ Licensed under Apache Standard License 2.0 Grails home is set to: /home/hudson/.hudson/ATM/001-ThirdParty/Codehaus/grails/grails-1.2-M3 Base Directory: /home/hudson2/.hudson/jobs/GrailsAtmUtilsTest/workspace/000-Common/04-ATMGrails/test-atm-utils Resolving dependencies... Dependencies resolved in 10450ms. Running script /home/hudson2/.hudson/jobs/GrailsAtmUtilsTest/workspace/000-Common/04-ATMGrails/test-atm-utils/../atm-utils/scripts/DeployRemote.groovy Environment set to development
            Hide
            jeffg2one jeffg2one added a comment -

            In the "Properties" box in your job config you can type any arbitrary key value pairs and those will be added as system properties:

            someProp=someValue
            someOtherProp=someOtherValue
            
            Show
            jeffg2one jeffg2one added a comment - In the "Properties" box in your job config you can type any arbitrary key value pairs and those will be added as system properties: someProp=someValue someOtherProp=someOtherValue

              People

              • Assignee:
                jeffg2one jeffg2one
                Reporter:
                mbetter Marcus Better
              • Votes:
                2 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: