Merge "Fix zuul config update"

This commit is contained in:
Jenkins 2016-09-20 11:01:52 +00:00 committed by Gerrit Code Review
commit aad22e78aa
6 changed files with 30 additions and 9 deletions

View File

@ -34,4 +34,12 @@ class { '::jenkins::job_builder':
git_url => $jjb_git_url, git_url => $jjb_git_url,
config_dir => $::project_config::jenkins_job_builder_config_dir, config_dir => $::project_config::jenkins_job_builder_config_dir,
require => $::project_config::config_dir, require => $::project_config::config_dir,
}
# directory for ci infra scripts
file { '/opt/ci-tools/':
ensure => 'directory',
owner => 'jenkins',
group => 'jenkins',
mode => '0755',
} }

View File

@ -63,6 +63,10 @@
disabled: false disabled: false
concurrent: false concurrent: false
parameters:
- string:
name: MURANO_DEPLOYMENT_REF
scm: scm:
- git: - git:
url: https://git.openstack.org/openstack/murano-deployment url: https://git.openstack.org/openstack/murano-deployment
@ -73,7 +77,18 @@
- pollscm: "* * * * * " - pollscm: "* * * * * "
builders: builders:
- shell: "$WORKSPACE/murano-ci/tools/update_config.sh" - shell: |
#!/bin/bash -ex
if [[ -n "$MURANO_DEPLOYMENT_REF" ]]; then
git fetch https://review.openstack.org/openstack/murano-deployment $MURANO_DEPLOYMENT_REF && git checkout FETCH_HEAD
fi
cp murano-ci/tools/update_config.sh /opt/ci-tools/
sudo -u zuul /opt/ci-tools/update_config.sh
sudo /etc/init.d/zuul reload
cp murano-ci/tools/update_pool.sh /opt/ci-tools/
- job: - job:
name: update-pool name: update-pool

View File

@ -1,10 +1,8 @@
#!/bin/bash -e #!/bin/bash -e
sudo su - zuul -c "cat $WORKSPACE/murano-ci/config/zuul/zuul.conf > /etc/zuul/zuul.conf" # backup old layout
sudo su - zuul -c "cat $WORKSPACE/murano-ci/config/zuul/gearman-logging.conf > /etc/zuul/gearman-logging.conf" cp -r /etc/zuul/layout/* /etc/zuul/layout.bak
sudo su - zuul -c "cat $WORKSPACE/murano-ci/config/zuul/layout.yaml > /etc/zuul/layout.yaml"
sudo su - zuul -c "cat $WORKSPACE/murano-ci/config/zuul/logging.conf > /etc/zuul/logging.conf"
sudo su - zuul -c "cat $WORKSPACE/murano-ci/config/zuul/openstack_functions.py > /etc/zuul/openstack_functions.py"
sudo service zuul reload
cp $WORKSPACE/murano-ci/tools/update_pool.sh /opt/bin/ # update layout and functions
cat murano-ci/zuul/layout.yaml > /etc/zuul/layout/layout.yaml
cat murano-ci/zuul/openstack_functions.py > /etc/zuul/layout/openstack_functions.py

View File

@ -1,6 +1,6 @@
#!/bin/bash -e #!/bin/bash -e
for i in $(sudo nodepool list | grep lab-cz5608 | awk -F '|' '{ print $2 }') for i in $(sudo nodepool list | grep cilab | awk -F '|' '{ print $2 }')
do do
sudo nodepool delete $i sudo nodepool delete $i
sleep 2 sleep 2

0
murano-ci/zuul/layout.yaml Executable file → Normal file
View File

0
murano-ci/zuul/openstack_functions.py Executable file → Normal file
View File