project-config/dev/zuul/openstack_functions.py
Jeremy Stanley d9f139f2d5 Remove precise/trusty label mapping in Zuul config
Now that there are no jobs declaring both .*-precise and .*-trusty
nodes at the same time, it is safe to remove the associated mapping
in Zuul and let it trust that any worker registering the job name
is capable of running it sanely.

This should not be approved until manual jenkins-jobs updates have
been completed and confirmed successful on all Jenkins masters.

Change-Id: I3b40021ffbf89842ed3a53412dfffa119f311797
2015-12-21 23:10:09 +00:00

30 lines
1.2 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])