Skip to content

Commit

Permalink
Release Jenkins 2.107.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
samrocketman committed May 26, 2018
1 parent 81e0399 commit 17b568c
Show file tree
Hide file tree
Showing 6 changed files with 141 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ apply from: "${bootstrapHome}/shared.gradle"
//version should be the jenkins.war version appended by .1 and increments .1
//every time there's non-jenkins.war version changes to the package.
//if upgrading jenkins.war version then it should be reset to .1.
version = '2.107.3.4'
version = '2.107.3.5'
description = "Built from ${tokens['PACKAGENAME']} @ ${tokens['COMMIT']}"

//Jenkins war and plugin versions
Expand Down
47 changes: 47 additions & 0 deletions configs/system-settings.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
system_message = '''
<!--
style color schemes come from bootstrap alerts
http://www.w3schools.com/bootstrap/bootstrap_alerts.asp
success:
background-color: #dff0d8;
border: 1px solid #d6e9c6;
color: #3c763d;
info:
background-color: #d9edf7;
border: 1px solid #bce8f1;
color: #31708f;
warning:
background-color: #fcf8e3;
border: 1px solid #faebcc;
color: #8a6d3b;
danger:
background-color: #f2dede;
border: 1px solid #ebccd1;
color: #a94442;
-->
<style>
div#systemmessage {
background-color: #dff0d8;
border: 1px solid #d6e9c6;
border-radius: 3px;
margin-bottom: 10px;
padding-left: 10px;
padding-right: 10px;
}
div#systemmessage p {
color: #3c763d;
}
</style>
<p>
<b>New and Improved:</b> welcome to a fresh redesign of
<tt>build.gimp.org</tt>. This re-design builds GIMP in a
<a href="https://github.com/gimp-ci/docker-jenkins-gimp">Docker container</a>. To see the new GIMP build pipelines click the "Open Blue Ocean" link in the menu to the left..
</p>
'''

master_settings = [
system_message: system_message,
frontend_url: 'https://build.gimp.org/',
master_usage: 'normal'
]
5 changes: 3 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ dependencies {
getjenkins 'org.jenkins-ci.main:jenkins-war:2.107.3@war'

//custom plugins (if any) provided by custom-plugins.txt; format: G:A:V@hpi or G:A:V@jpi
getplugins 'org.jenkins-ci.plugins:git-client:3.0.0-beta3-SNAPSHOT@hpi'
getplugins 'org.jenkins-ci.plugins:git:4.0.0-SNAPSHOT@hpi'

//get plugins
getplugins 'com.coravy.hudson.plugins.github:github:1.29.0@hpi'
Expand Down Expand Up @@ -66,7 +64,9 @@ dependencies {
getplugins 'org.jenkins-ci.plugins:durable-task:1.22@hpi'
getplugins 'org.jenkins-ci.plugins:email-ext:2.62@hpi'
getplugins 'org.jenkins-ci.plugins:embeddable-build-status:1.9@hpi'
getplugins 'org.jenkins-ci.plugins:git-client:3.0.0-beta3-SNAPSHOT@hpi'
getplugins 'org.jenkins-ci.plugins:git-server:1.7@hpi'
getplugins 'org.jenkins-ci.plugins:git:4.0.0-SNAPSHOT@hpi'
getplugins 'org.jenkins-ci.plugins:github-api:1.90@hpi'
getplugins 'org.jenkins-ci.plugins:github-branch-source:2.3.4@hpi'
getplugins 'org.jenkins-ci.plugins:groovy:2.0@hpi'
Expand Down Expand Up @@ -94,6 +94,7 @@ dependencies {
getplugins 'org.jenkins-ci.plugins:scm-api:2.2.7@hpi'
getplugins 'org.jenkins-ci.plugins:scm-filter-branch-pr:0.3@hpi'
getplugins 'org.jenkins-ci.plugins:script-security:1.44@hpi'
getplugins 'org.jenkins-ci.plugins:sidebar-link:1.9.1@hpi'
getplugins 'org.jenkins-ci.plugins:sse-gateway:1.15@hpi'
getplugins 'org.jenkins-ci.plugins:ssh-credentials:1.13@hpi'
getplugins 'org.jenkins-ci.plugins:structs:1.14@hpi'
Expand Down
7 changes: 7 additions & 0 deletions jenkins_bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ jenkins_console -s "./scripts/configure-global-jenkinsfile-gimp.groovy"
jenkins_console -s "${SCRIPT_LIBRARY_PATH}/configure-markup-formatter.groovy"
#configure shared pipeline library
jenkins_console -s ./configs/shared-pipelines.groovy -s "${SCRIPT_LIBRARY_PATH}"/configure-pipeline-global-shared-libraries.groovy
#lockable resources for jobs
jenkins_console -s ./configs/lockable-resources.groovy -s "${SCRIPT_LIBRARY_PATH}"/configure-lockable-resources.groovy
#system settings such as domain name and system message
jenkins_console -s ./configs/system-settings.groovy -s "${SCRIPT_LIBRARY_PATH}"/configure-jenkins-settings.groovy
#set the default view
jenkins_console -s ./scripts/configure-default-view.groovy
#finally authorization to allow the public to view Jenkins
jenkins_console -s ./scripts/configure-authorization-strategy.groovy
43 changes: 43 additions & 0 deletions scripts/configure-authorization-strategy.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
Copyright (c) 2015-2018 Sam Gleske - https://github.com/samrocketman/jenkins-bootstrap-shared
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
Configure authorization strategy for public READ access and admin-only
logins.
*/

//import hudson.security.ProjectMatrixAuthorizationStrategy
import hudson.model.User
import hudson.security.GlobalMatrixAuthorizationStrategy
import jenkins.model.Jenkins

def installed_plugins = Jenkins.instance.pluginManager.plugins*.shortName
//configure the authorization strategy
def authz_strategy = new GlobalMatrixAuthorizationStrategy()
//set anonymous permissions
if('embeddable-build-status' in installed_plugins) {
//only add permission if embeddable-build-status plugin is installed
authz_strategy.add(this.class.classLoader.loadClass("org.jenkinsci.plugins.badge.PublicBadgeAction").VIEW_STATUS, 'anonymous')
}
//authz_strategy.add(Item.DISCOVER, 'anonymous')
authz_strategy.add(Item.READ, 'anonymous')
authz_strategy.add(Jenkins.READ, 'anonymous')
authz_strategy.add(View.READ, 'anonymous')
//Grant admin perms to authenticated users
authz_strategy.add(Jenkins.ADMINISTER, 'authenticated')
//Configure global authorization
Jenkins.instance.authorizationStrategy = authz_strategy
//save settings to persist across restarts
Jenkins.instance.save()
40 changes: 40 additions & 0 deletions scripts/configure-default-view.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
Copyright (c) 2015-2018 Sam Gleske - https://github.com/samrocketman/jenkins-bootstrap-shared
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
Sets the primary view of Jenkins.
*/

import hudson.model.View
import jenkins.model.Jenkins

Jenkins j = Jenkins.instance

default_view = 'Status Overview'

View desired_view = j.getView(default_view)
if(desired_view) {
if(desired_view != j.primaryView) {
j.primaryView = desired_view
j.save()
println "Primary view is now '${default_view}'."
}
else {
println "Nothing changed. Primary view is already '${default_view}'."
}
}
else {
println "ERROR: '${default_view}' does not exist as an available view."
}

0 comments on commit 17b568c

Please sign in to comment.