* doc/source/jjb.rst * doc/source/stackforge.rst: Update examples to recommend bare-precise nodes in new job configuration. * modules/openstack_project/files/jenkins_job_builder/config/*.yaml: Change the node label for all jobs opreviously using precise to use bare-precise instead. * modules/openstack_project/files/zuul/layout.yaml: Get rid of the transitional matches for setting the single use parameter function on specific job names and just set it on everything as a default. Add patterns for jobs which need long-running slaves to apply a reusable node parameter function instead. * modules/openstack_project/files/zuul/openstack_functions.py: Add a parameter function for reusable nodes which refrains from enabling auto-offline behavior. * modules/openstack_project/templates/nodepool/nodepool.yaml.erb: Double the minimum ready bare-precise nodes to accommodate additional load. Change-Id: I2a90c5b120a50bb8033c891702185f054ee84d35
		
			
				
	
	
		
			39 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
# Copyright 2013 OpenStack Foundation
 | 
						|
#
 | 
						|
# 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.
 | 
						|
 | 
						|
 | 
						|
def set_log_url(item, job, params):
 | 
						|
    if hasattr(item.change, 'refspec'):
 | 
						|
        path = "%s/%s/%s/%s" % (
 | 
						|
            params['ZUUL_CHANGE'][-2:], params['ZUUL_CHANGE'],
 | 
						|
            params['ZUUL_PATCHSET'], params['ZUUL_PIPELINE'])
 | 
						|
    elif hasattr(item.change, 'ref'):
 | 
						|
        path = "%s/%s/%s" % (
 | 
						|
            params['ZUUL_NEWREV'][:2], params['ZUUL_NEWREV'],
 | 
						|
            params['ZUUL_PIPELINE'])
 | 
						|
    else:
 | 
						|
        path = params['ZUUL_PIPELINE']
 | 
						|
    params['BASE_LOG_PATH'] = path
 | 
						|
    params['LOG_PATH'] = path + '/%s/%s' % (job.name,
 | 
						|
                                            params['ZUUL_UUID'][:7])
 | 
						|
 | 
						|
 | 
						|
def single_use_node(item, job, params):
 | 
						|
    set_log_url(item, job, params)
 | 
						|
    params['OFFLINE_NODE_WHEN_COMPLETE'] = '1'
 | 
						|
 | 
						|
 | 
						|
def reusable_node(item, job, params):
 | 
						|
    set_log_url(item, job, params)
 |