Merge "Add 'propose' job for openstack-ansible-tests"
This commit is contained in:
commit
6954af5734
@ -156,3 +156,18 @@
|
||||
- '-nv'
|
||||
- ''
|
||||
- '{name}-announce-release'
|
||||
|
||||
- job:
|
||||
name: propose-openstack-ansible-update-osa-test-scripts
|
||||
node: proposal
|
||||
|
||||
builders:
|
||||
- proposal-slave-cleanup
|
||||
- revoke-sudo
|
||||
- link-logs
|
||||
- net-info
|
||||
- zuul-git-prep
|
||||
- shell: /usr/local/jenkins/slave_scripts/propose_update.sh openstack-ansible-tests
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
|
@ -65,6 +65,17 @@ elif [ "$OWN_PROJECT" == "puppet-openstack-constraints" ] ; then
|
||||
function update {
|
||||
bash /usr/local/jenkins/slave_scripts/generate_puppetfile.sh
|
||||
}
|
||||
elif [ "$OWN_PROJECT" == "openstack-ansible-tests" ] ; then
|
||||
INITIAL_COMMIT_MSG="Updated from OpenStack Ansible Tests"
|
||||
TOPIC="openstack/openstack-ansible-tests/sync-tests"
|
||||
###### WIP - REMOVE ME #####
|
||||
# Use a retired repository for tesing
|
||||
PROJECTS="openstack/openstack-ansible-os_swift_sync"
|
||||
##### END OF WIP ########
|
||||
#PROJECTS=$(./gen-projects-list.sh)
|
||||
function update {
|
||||
bash /usr/local/jenkins/slave_scripts/sync_openstack_ansible_common_files.sh
|
||||
}
|
||||
else
|
||||
echo "Unknown project $1" >2
|
||||
exit 1
|
||||
|
57
jenkins/scripts/sync_openstack_ansible_common_files.sh
Normal file
57
jenkins/scripts/sync_openstack_ansible_common_files.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/bin/bash -xe
|
||||
#
|
||||
# Copyright 2017, SUSE LINUX GmbH.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Copy common files from the openstack-ansible-tests repository
|
||||
set -eu
|
||||
|
||||
OSA_PROJECT=${1}
|
||||
|
||||
# Careful of what you put here.
|
||||
declare -ra files_to_sync=(run_tests.sh bindep.txt Vagrantfile tests/tests-repo-clone.sh)
|
||||
|
||||
excluded_projects=
|
||||
exclude_project() {
|
||||
excluded_projects+="$1 "
|
||||
}
|
||||
|
||||
# Always exclude openstack-ansible-tests repository. This is not
|
||||
# necessary because OSA_PROJECT should never be "openstack-ansible-tests"
|
||||
# but it can serve as an example for users who may add more
|
||||
# projects in the future.
|
||||
exclude_project "openstack-ansible-tests"
|
||||
|
||||
check_and_ignore() {
|
||||
for z in $(echo ${excluded_projects} | tr ' ' '\n'); do
|
||||
[[ $1 == $z ]] && return 0
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
for x in ${files_to_sync[@]}; do
|
||||
# If the target repo does not have such a file already
|
||||
# then it's probably best to leave it alone.
|
||||
[[ ! -e ${OSA_PROJECT}/${x} ]] && continue
|
||||
|
||||
# Skip the project if it is in the excluded list
|
||||
check_and_ignore ${OSA_PROJECT} && continue
|
||||
|
||||
# We don't preserve anything from the target repo.
|
||||
# We simply assume that all OSA projects need the same
|
||||
# $files_to_sync
|
||||
cp ${x} ${OSA_PROJECT}/${x}
|
||||
done
|
||||
|
||||
exit 0
|
@ -14271,6 +14271,8 @@ projects:
|
||||
- name: ansible-role-functional-jobs-centos7
|
||||
- name: ansible-role-functional-jobs-trusty
|
||||
- name: ansible-role-functional-jobs-xenial
|
||||
post:
|
||||
- propose-openstack-ansible-update-osa-test-scripts
|
||||
|
||||
- name: openstack/openstack-chef-repo
|
||||
template:
|
||||
|
@ -47,7 +47,7 @@ def set_node_options(item, job, params):
|
||||
params['OFFLINE_NODE_WHEN_COMPLETE'] = '1'
|
||||
# Pass tags through for subunit2sql
|
||||
params['JOB_TAGS'] = ' '.join(sorted(job.tags))
|
||||
proposal_re = r'^.*(propose|upstream)-(.*?)-(constraints-.*|updates?|update-(liberty|mitaka|newton|ocata|pike)|plugins-list|openstack-constraints|update-constraints)$' # noqa
|
||||
proposal_re = r'^.*(propose|upstream)-(.*?)-(constraints-.*|updates?|update-(liberty|mitaka|newton|ocata|pike)|plugins-list|openstack-constraints|update-constraints|osa-test-files)$' # noqa
|
||||
release_re = r'^.*-(forge|jenkinsci|mavencentral|pypi-(both|wheel)|npm)-upload$'
|
||||
hook_re = r'^hook-(.*?)-(rtfd)$'
|
||||
wheel_re = r'^wheel-(build|release)-.*$'
|
||||
|
Loading…
Reference in New Issue
Block a user