+
+ {foreach $jenkinsConfig in $jenkinsConfigs}
+
+ {call aui.form.form}
+ {param action: $relUrl /}
+ {param content}
+ {call aui.group.group}
+ {param content}
+ {call aui.form.textField}
+ {param id: 'name' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.name.label', 'Jenkins Server Name') /}
+ {param value: $jenkinsConfig.name /}
+ {param descriptionText: stash_i18n('stash.web.stash.jenkins.name.description', 'This name will be used by users setting up Stashbot to pick a Jenkins server.') /}
+ {/call}
+ {call aui.form.checkboxField}
+ {param legendContent: stash_i18n('stash.web.stash.locked.button.description', 'Force as Default Server') /}
+ {param descriptionText: 'Locking this Jenkins server forces repository owners to use this Jenkins server configuration by default. For a repo to use a different server, a System Admin needs to change it for them.' /}
+ {param fields: [[
+ 'id': 'locked',
+ 'labelText': stash_i18n('stash.web.stash.locked.button.label', 'Locked'),
+ 'isChecked': $jenkinsConfig.locked
+ ]] /}
+ {/call}
+ {/param}
+ {/call}
+
+ {call aui.group.group}
+ {param content}
+
Jenkins Settings
+ {call aui.form.textField}
+ {param id: 'url' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.url.label', 'Server URL') /}
+ {param value: $jenkinsConfig.url /}
+ {param descriptionText: stash_i18n('stash.web.stash.jenkins.url.description', 'Jenkins URL (e.g. http://jenkins.example.com:1234/)') /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'username' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.username.label', 'Username') /}
+ {param value: $jenkinsConfig.username /}
+ {/call}
+ {call aui.form.passwordField}
+ {param id: 'password' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.password.label', 'Password') /}
+ {param value: $jenkinsConfig.password /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'prefixTemplate' /}
+ {param labelContent: stash_i18n('stash.web.stash.prefixTemplate.label', 'Job Folder') /}
+ {param value: $jenkinsConfig.prefixTemplate /}
+ {param descriptionText: stash_i18n('stash.web.stash.prefixTemplate.description', 'The folder Stashbot will place jobs in Jenkins. If you are not using the Jenkins Folders plugin, or do not want to use subfolders, just use /. The folder can be specified using the template variables $project and $repo') /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'jobTemplate' /}
+ {param labelContent: stash_i18n('stash.web.stash.jobTemplate.label', 'Job Name Template') /}
+ {param value: $jenkinsConfig.jobTemplate /}
+ {param descriptionText: stash_i18n('stash.web.stash.jobTemplate.description', 'The name of the jobs created. It supports template variables $project and $repo. The job type will be appended at the end.') /}
+ {/call}
+ {/param}
+ {/call}
+
+ {call aui.group.group}
+ {param content}
+ Stash Settings
+ {call aui.form.selectField}
+ {param id: 'authenticationMode' /}
+ {param labelContent: stash_i18n('stash.web.stash.authenticationMode.label', 'Authentication Mode') /}
+ {param options: $authenticationModeData[$jenkinsConfig.name] /}
+ {param value: $jenkinsConfig.authenticationModeStr /}
+ {param descriptionText: 'The authentication mode to use for jenkins to talk back to stash. If you select Manual Credentials, create it in jenkins first then add the UUID of the credential in the password field, while using a valid username for stash in the username field (which is still used for comments on pull requests, etc.)' /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'stashUsername' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.stashusername.label', 'Username') /}
+ {param value: $jenkinsConfig.stashUsername /}
+ {param descriptionText: stash_i18n('stash.web.stash.jenkins.stashusername.description', 'Stash user that can clone the appropriate repos. This user will also comment on PRs. If the user does not exist, Stashbot will create it with the password below.') /}
+ {/call}
+ {call aui.form.passwordField}
+ {param id: 'stashPassword' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.stashpassword.label', 'Password or Jenkins Cred ID') /}
+ {param value: $jenkinsConfig.stashPassword /}
+ {param descriptionText: stash_i18n('stash.web.stash.jenkins.stashpassword.description', 'Password for the username. In Credential UUID mode, it is a Jenkins Credential ID. Supports $password and $repo replacement in Credential UUID mode.') /}
+ {/call}
+ {/param}
+ {/call}
+
+ {call aui.group.group}
+ {param content}
+ Job Settings
+ {call aui.form.textField}
+ {param id: 'maxVerifyChain' /}
+ {param labelContent: stash_i18n('stash.web.stash.maxVerifyChain.label', 'Maximum Commit Verifications') /}
+ {param value: ($jenkinsConfig.maxVerifyChain == 0 ? '0' : $jenkinsConfig.maxVerifyChain) /}
+ {param descriptionText: stash_i18n('stash.web.stash.maxVerifyChain.description', 'The maximum number of builds to trigger for a single push. Individual repositories also have this setting, but they are limited by the setting of the jenkins server as well. Set to 0 for "no limit". You probably want to set this to between 50% and 200% of the number of executors your jenkins instance has, depending on how long your build takes, your expected latency, and load.') /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'defaultTimeout' /}
+ {param labelContent: stash_i18n('stash.web.stash.defaultTimeout.label', 'Default Build Timeout') /}
+ {param value: $jenkinsConfig.defaultTimeout /}
+ {param descriptionText: stash_i18n('stash.web.stash.defaultTimeout.description', 'The default timeout value (in minutes from 5 to 10080) for a Jenkins job created by Stashbot. This can be overriden on the repo level.') /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'globalLabel' /}
+ {param labelContent: 'Global Job Label' /}
+ {param value: $jenkinsConfig.globalLabel /}
+ {param descriptionText: 'The default label all Stashbot jobs should have on this Jenkins server. This is useful for Jenkins servers with multiple pools of nodes. For no default label, leave blank.' /}
+ {/call}
+ {call aui.form.textareaField}
+ {param id: 'globalPrebuild' /}
+ {param labelContent: stash_i18n('stash.web.stash.globalPrebuild.label', 'Global Pre-build Commands') /}
+ {param value: $jenkinsConfig.globalPrebuildCommand /}
+ {param descriptionText: stash_i18n('stash.web.stash.globalPrebuild.description', 'Command or commands to run before all builds. Useful for cleanup and global prep.') /}
+ {/call}
+ {/param}
+ {/call}
+
+ {call aui.group.group}
+ {param content}
+ {call aui.form.buttons}
+ {param content}
+ {call aui.form.submit}
+ {param id: 'submit' /}
+ {param text: 'Save' /}
+ {param type: 'submit' /}
+ {/call}
+ {call stash.buttons.button}
+ {param id: 'delete' /}
+ {param buttonText: 'Delete Entry ' + $jenkinsConfig.name /}
+ {param href: $relUrl + '/delete/' + $jenkinsConfig.name /}
+ {/call}
+ {/param}
+ {/call}
+ {/param}
+ {/call}
+
+
+ {/param}
+ {/call}
+
+ {/foreach}
+
+
+ {call aui.form.form}
+ {param action: $relUrl /}
+ {param content}
+
+ {call aui.group.group}
+ {param content}
+ {call aui.form.textField}
+ {param id: 'name' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.name.label', 'Jenkins Server Name') /}
+ {param placeholderText: 'enter name here [a-zA-Z0-9]+' /}
+ {param descriptionText: stash_i18n('stash.web.stash.jenkins.name.description', 'This name will be used by users setting up Stashbot to pick a Jenkins server.') /}
+ {/call}
+ {call aui.form.checkboxField}
+ {param legendContent: stash_i18n('stash.web.stash.locked.button.description', 'Force as Default Server') /}
+ {param descriptionText: 'Locking this Jenkins server forces repository owners to use this Jenkins server configuration by default. For a repo to use a different server, a System Admin needs to change it for them.' /}
+ {param fields: [[
+ 'id': 'locked',
+ 'labelText': stash_i18n('stash.web.stash.locked.button.label', 'Locked'),
+ ]] /}
+ {/call}
+ {/param}
+ {/call}
+
+ {call aui.group.group}
+ {param content}
+
Jenkins Settings
+ {call aui.form.textField}
+ {param id: 'url' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.url.label', 'Server URL') /}
+ {param placeholderText: 'http://jenkins.example.com:8080/' /}
+ {param descriptionText: stash_i18n('stash.web.stash.jenkins.url.description', 'Jenkins URL (e.g. http://jenkins.example.com:1234/)') /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'username' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.username.label', 'Username') /}
+ {param value: 'jenkins_user' /}
+ {/call}
+ {call aui.form.passwordField}
+ {param id: 'password' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.password.label', 'Password') /}
+ {param value: 'jenkins_password' /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'prefixTemplate' /}
+ {param labelContent: stash_i18n('stash.web.stash.prefixTemplate.label', 'Job Folder') /}
+ {param value: '/' /}
+ {param descriptionText: stash_i18n('stash.web.stash.prefixTemplate.description', 'The folder Stashbot will place jobs in Jenkins. If you are not using the Jenkins Folders plugin, or do not want to use subfolders, just use /. The folder can be specified using the template variables $project and $repo') /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'jobTemplate' /}
+ {param labelContent: stash_i18n('stash.web.stash.jobTemplate.label', 'Job Name Template') /}
+ {param value: '$project_$repo' /}
+ {param descriptionText: stash_i18n('stash.web.stash.jobTemplate.description', 'The name of the jobs created. It supports template variables $project and $repo. The job type will be appended at the end.') /}
+ {/call}
+ {/param}
+ {/call}
+
+ {call aui.group.group}
+ {param content}
+ Stash Settings
+ {call aui.form.selectField}
+ {param id: 'authenticationMode' /}
+ {param labelContent: stash_i18n('stash.web.stash.authenticationMode.label', 'Authentication Mode') /}
+ {param options: $authenticationModeData['default'] /}
+ {param descriptionText: 'The authentication mode to use for jenkins to talk back to stash. If you select Manual Credentials, create it in jenkins first then add the UUID of the credential in the password field, while using a valid username for stash in the username field (which is still used for comments on pull requests, etc.)' /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'stashUsername' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.stashusername.label', 'Username') /}
+ {param value: 'stash_user' /}
+ {param descriptionText: stash_i18n('stash.web.stash.jenkins.stashusername.description', 'Stash user that can clone the appropriate repos. This user will also comment on PRs. If the user does not exist, Stashbot will create it with the password below.') /}
+ {/call}
+ {call aui.form.passwordField}
+ {param id: 'stashPassword' /}
+ {param labelContent: stash_i18n('stash.web.stash.jenkins.stashpassword.label', 'Password or Jenkins Cred ID') /}
+ {param value: 'stash_password' /}
+ {param descriptionText: stash_i18n('stash.web.stash.jenkins.stashpassword.description', 'Password for the username. In Credential UUID mode, it is a Jenkins Credential ID. Supports $password and $repo replacement in Credential UUID mode.') /}
+ {/call}
+ {/param}
+ {/call}
+
+
+ {call aui.group.group}
+ {param content}
+ Job Settings
+ {call aui.form.textField}
+ {param id: 'maxVerifyChain' /}
+ {param labelContent: stash_i18n('stash.web.stash.maxVerifyChain.label', 'Maximum Commit Verifications') /}
+ {param value: '10' /}
+ {param descriptionText: stash_i18n('stash.web.stash.maxVerifyChain.description', 'The maximum number of builds to trigger for a single push. Individual repositories also have this setting, but they are limited by the setting of the jenkins server as well. Set to 0 for "no limit". You probably want to set this to between 50% and 200% of the number of executors your jenkins instance has, depending on how long your build takes, your expected latency, and load.') /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'defaultTimeout' /}
+ {param labelContent: stash_i18n('stash.web.stash.defaultTimeout.label', 'Default Build Timeout') /}
+ {param value: '240' /}
+ {param descriptionText: stash_i18n('stash.web.stash.defaultTimeout.description', 'The default timeout value (in minutes from 5 to 10080) for a Jenkins job created by Stashbot. This can be overriden on the repo level.') /}
+ {/call}
+ {call aui.form.textField}
+ {param id: 'globalLabel' /}
+ {param labelContent: 'Global Job Label' /}
+ {param value: '' /}
+ {param descriptionText: 'The default label all Stashbot jobs should have on this Jenkins server. This is useful for Jenkins servers with multiple pools of nodes. For no default label, leave blank.' /}
+ {/call}
+ {call aui.form.textareaField}
+ {param id: 'globalPrebuild' /}
+ {param labelContent: stash_i18n('stash.web.stash.globalPrebuild.label', 'Global Pre-build Commands') /}
+ {param value: '/bin/true' /}
+ {param descriptionText: stash_i18n('stash.web.stash.globalPrebuild.description', 'Command or commands to run before all builds. Useful for cleanup and global prep.') /}
+ {/call}
+ {/param}
+ {/call}
+
+
+ {call aui.form.buttons}
+ {param content}
+ {call aui.form.submit}
+ {param id: 'submit' /}
+ {param text: 'Save' /}
+ {param type: 'submit' /}
+ {/call}
+ {/param}
+ {/call}
+
+ {/param}
+ {/call}
+
+
+
+
{/param}
{/call}
+
+