-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding jenkins "discard old builds" feature #203
Conversation
@sab3d - if you're still interested in adding this functionality, please add documentation to the feature you're adding in the doc block above the method. Otherwise, please close this issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document these params in the doc block above the method
@@ -299,6 +299,16 @@ def build_freestyle_config(params) | |||
xml.description | |||
xml.keepDependencies "#{params[:keep_dependencies]}" | |||
xml.properties | |||
#buildlogs related stuff | |||
if params[:discard_old_builds] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand correctly, this method build_freestyle_config
only outputs the XML for a job config, rather than actually creating that job on the server. If so, this is 👍 to merge, I got response XML like this while using login_with_irb:
2.2.7 :001 > @client.job.build_freestyle_config({name: 'testjob', discard_old_builds: {daysToKeep: 3, numToKeep: 1, artifactDaysToKeep: 1, artifactNumToKeep: 1}})
=> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project>\n <actions/>\n <description/>\n <keepDependencies>false</keepDependencies>\n <properties/>\n <logRotator class=\"hudson.tasks.LogRotator\">\n <daysToKeep>3</daysToKeep>\n <numToKeep>1</numToKeep>\n <artifactDaysToKeep>1</artifactDaysToKeep>\n <artifactNumToKeep>1</artifactNumToKeep>\n </logRotator>\n <scm class=\"hudson.scm.NullSCM\"/>\n <canRoam>true</canRoam>\n <disabled>false</disabled>\n <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>\n <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>\n <triggers class=\"vector\"/>\n<concurrentBuild>false</concurrentBuild>\n <builders/>\n <publishers/>\n <buildWrappers/>\n</project>\n"
@arangamani as long as I understand this correctly, can you 👍 and merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@katelovescode Go for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good barring my comment being wrong.
adding jenkins "discard old builds" feature