Merge "Implement propose_rdo_promote CI periodic job"
This commit is contained in:
commit
c0a7436c33
@ -322,6 +322,25 @@
|
|||||||
- console-log
|
- console-log
|
||||||
- proposal-slave-cleanup
|
- proposal-slave-cleanup
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: propose-puppet-openstack-rdo-promote
|
||||||
|
node: proposal
|
||||||
|
|
||||||
|
builders:
|
||||||
|
- revoke-sudo
|
||||||
|
- link-logs
|
||||||
|
- branch-git-prep:
|
||||||
|
branch: master
|
||||||
|
- net-info
|
||||||
|
- shell: |
|
||||||
|
export ZUUL_REFNAME=master
|
||||||
|
/usr/local/jenkins/slave_scripts/propose_update.sh \
|
||||||
|
puppet-openstack-rdo-promote
|
||||||
|
|
||||||
|
publishers:
|
||||||
|
- console-log
|
||||||
|
- proposal-slave-cleanup
|
||||||
|
|
||||||
- job-group:
|
- job-group:
|
||||||
name: 'puppet-check-jobs'
|
name: 'puppet-check-jobs'
|
||||||
puppet_version:
|
puppet_version:
|
||||||
|
44
jenkins/scripts/propose_rdo_promote.sh
Executable file
44
jenkins/scripts/propose_rdo_promote.sh
Executable file
@ -0,0 +1,44 @@
|
|||||||
|
#!/bin/bash -xe
|
||||||
|
#
|
||||||
|
# Copyright (C) 2016 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# Get latest RDO trunk consistent URL
|
||||||
|
#
|
||||||
|
|
||||||
|
DIR='puppet-openstack-integration'
|
||||||
|
BASE_URL=https://trunk.rdoproject.org/centos7-master
|
||||||
|
CONSISTENT_URL=$BASE_URL/consistent/versions.csv
|
||||||
|
|
||||||
|
ts=0
|
||||||
|
for current in $(curl -s $CONSISTENT_URL); do
|
||||||
|
val=$(echo $current|cut -d, -f7)
|
||||||
|
if [[ "$val" != 'Last Success Timestamp' ]] && [[ "$val" -gt "$ts" ]]; then
|
||||||
|
ts=$val
|
||||||
|
line=$current
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $ts = 0 ]; then
|
||||||
|
echo "something went wrong aborting" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sha1=$(echo $line|cut -d, -f3)
|
||||||
|
psha1=$(echo $line|cut -d, -f5|sed 's/\(........\).*/\1/')
|
||||||
|
url=$BASE_URL/$(echo $sha1|sed 's/\(..\).*/\1/')/$(echo $sha1|sed 's/..\(..\).*/\1/')/${sha1}_${psha1}/
|
||||||
|
sed -i "s@\(.* => \)'http.*\(centos7\|delorean\).*',@\1'$url',@" $DIR/manifests/repos.pp
|
||||||
|
|
||||||
|
# for debug
|
||||||
|
cat $DIR/manifests/repos.pp
|
@ -64,6 +64,13 @@ elif [ "$OWN_PROJECT" == "puppet-openstack-constraints" ] ; then
|
|||||||
function update {
|
function update {
|
||||||
bash /usr/local/jenkins/slave_scripts/generate_puppetfile.sh
|
bash /usr/local/jenkins/slave_scripts/generate_puppetfile.sh
|
||||||
}
|
}
|
||||||
|
elif [ "$OWN_PROJECT" == "puppet-openstack-rdo-promote" ] ; then
|
||||||
|
INITIAL_COMMIT_MSG="Promote RDO repository to latest consistent URL"
|
||||||
|
TOPIC="openstack/puppet/rdo"
|
||||||
|
PROJECTS=openstack/puppet-openstack-integration
|
||||||
|
function update {
|
||||||
|
bash /usr/local/jenkins/slave_scripts/propose_rdo_promote.sh
|
||||||
|
}
|
||||||
else
|
else
|
||||||
echo "Unknown project $1" >2
|
echo "Unknown project $1" >2
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -9842,6 +9842,7 @@ projects:
|
|||||||
- name: puppet-openstack-integration-jobs-puppet4-check-nv
|
- name: puppet-openstack-integration-jobs-puppet4-check-nv
|
||||||
periodic:
|
periodic:
|
||||||
- propose-puppet-openstack-constraints
|
- propose-puppet-openstack-constraints
|
||||||
|
- propose-puppet-openstack-rdo-promote
|
||||||
experimental:
|
experimental:
|
||||||
- 'gate-puppet-openstack-integration-dsvm-multinode-nv'
|
- 'gate-puppet-openstack-integration-dsvm-multinode-nv'
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ def set_node_options(item, job, params):
|
|||||||
params['OFFLINE_NODE_WHEN_COMPLETE'] = '1'
|
params['OFFLINE_NODE_WHEN_COMPLETE'] = '1'
|
||||||
# Pass tags through for subunit2sql
|
# Pass tags through for subunit2sql
|
||||||
params['JOB_TAGS'] = ' '.join(sorted(job.tags))
|
params['JOB_TAGS'] = ' '.join(sorted(job.tags))
|
||||||
proposal_re = r'^.*(merge-release-tags|(propose|upstream)-(.*?)-(constraints-.*|updates?|update-(liberty|mitaka)|plugins-list|openstack-constraints))$' # noqa
|
proposal_re = r'^.*(merge-release-tags|(propose|upstream)-(.*?)-(rdo-promote|constraints-.*|updates?|update-(liberty|mitaka)|plugins-list|openstack-constraints))$' # noqa
|
||||||
release_re = r'^.*-(forge|jenkinsci|mavencentral|pypi-(both|wheel)|npm)-upload$'
|
release_re = r'^.*-(forge|jenkinsci|mavencentral|pypi-(both|wheel)|npm)-upload$'
|
||||||
hook_re = r'^hook-(.*?)-(rtfd)$'
|
hook_re = r'^hook-(.*?)-(rtfd)$'
|
||||||
wheel_re = r'^wheel-(build|release)-.*$'
|
wheel_re = r'^wheel-(build|release)-.*$'
|
||||||
|
Loading…
Reference in New Issue
Block a user