summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColleen Murphy <colleen@gazlene.net>2018-06-02 15:11:09 +0200
committerColleen Murphy <colleen.murphy@suse.de>2018-06-07 16:01:26 +0200
commitd2dc5dd2072fd86b7abfffb16b127c6ff16b32d5 (patch)
tree0c162a196a6c7745ed052817d94d20f32d82799b
parent40a4b0c0a08f7a95310da993ee4b7d77ff798c71 (diff)
Convert infra's beaker jobs for zuulv3
This patch moves the legacy beaker jobs that were being used for Infra's puppet modules out of the legecy definitions and into the regular list. Historically, the test scripts were shared between the Infra and Puppet OpenStack teams, but the Puppet OpenStack team has already moved their jobs in-repo so we can remove tasks specific to their setup. We need to leave some jobs and playbooks in place that are still being used by the puppet-midonet project which belongs to neither team. Change-Id: Iefea6ee173cff2bf050d99d96ae2e1d1a51b7f49
Notes
Notes (review): Code-Review+2: Andreas Jaeger <jaegerandi@gmail.com> Code-Review+2: Monty Taylor <mordred@inaugust.com> Workflow+1: Monty Taylor <mordred@inaugust.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 07 Jun 2018 14:54:47 +0000 Reviewed-on: https://review.openstack.org/571929 Project: openstack-infra/openstack-zuul-jobs Branch: refs/heads/master
-rw-r--r--playbooks/infra-puppet-beaker-rspec/run.yaml53
-rw-r--r--playbooks/legacy/puppet-beaker-rspec/post.yaml15
-rw-r--r--playbooks/legacy/puppet-beaker-rspec/run.yaml126
-rw-r--r--zuul.d/jobs.yaml103
-rw-r--r--zuul.d/project-templates.yaml25
-rw-r--r--zuul.d/zuul-legacy-jobs.yaml88
-rw-r--r--zuul.d/zuul-legacy-project-templates.yaml28
7 files changed, 183 insertions, 255 deletions
diff --git a/playbooks/infra-puppet-beaker-rspec/run.yaml b/playbooks/infra-puppet-beaker-rspec/run.yaml
new file mode 100644
index 0000000..08f36fe
--- /dev/null
+++ b/playbooks/infra-puppet-beaker-rspec/run.yaml
@@ -0,0 +1,53 @@
1- hosts: all
2 name: Beaker-rspec functional testing for Infra puppet modules
3 roles:
4 - bindep
5
6 tasks:
7
8 - name: Set up SSH for beaker
9 shell:
10 cmd: |
11 echo "" | sudo tee -a /etc/ssh/sshd_config
12 echo "Match address 127.0.0.1" | sudo tee -a /etc/ssh/sshd_config
13 echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
14 echo "" | sudo tee -a /etc/ssh/sshd_config
15 echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
16 echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
17 mkdir -p ~/.ssh
18 ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P ""
19 sudo mkdir -p /root/.ssh
20 cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
21 if [ -f /usr/bin/yum ]; then
22 sudo systemctl reload sshd
23 elif [ -f /usr/bin/apt-get ]; then
24 sudo service ssh restart
25 fi
26
27 - name: Create local gems directory
28 file:
29 state: directory
30 path: '{{ ansible_user_dir }}/.bundled_gems'
31
32 - name: Install ruby dependencies
33 become: yes
34 shell:
35 cmd: |
36 if [ -f /usr/bin/yum ]; then
37 yum install ruby-devel gcc-c++ -y
38 elif [ -f /usr/bin/apt-get ]; then
39 apt-get install ruby-dev -y
40 fi
41
42 - name: Execute acceptance tests
43 shell:
44 cmd: |
45 gem install bundler --no-rdoc --no-ri --verbose
46 $GEM_HOME/bin/bundle install --retry 3
47 export BEAKER_set={{ nodeset }}
48 export BEAKER_debug=yes
49 export BEAKER_color=no
50 $GEM_HOME/bin/bundle exec rspec spec/acceptance
51 chdir: "{{ zuul.project.src_dir }}"
52 environment:
53 'GEM_HOME': "{{ ansible_user_dir }}/.bundled_gems"
diff --git a/playbooks/legacy/puppet-beaker-rspec/post.yaml b/playbooks/legacy/puppet-beaker-rspec/post.yaml
deleted file mode 100644
index e07f551..0000000
--- a/playbooks/legacy/puppet-beaker-rspec/post.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
1- hosts: primary
2 tasks:
3
4 - name: Copy files from {{ ansible_user_dir }}/workspace/ on node
5 synchronize:
6 src: '{{ ansible_user_dir }}/workspace/'
7 dest: '{{ zuul.executor.log_root }}'
8 mode: pull
9 copy_links: true
10 verify_host: true
11 rsync_opts:
12 - --include=/logs/**
13 - --include=*/
14 - --exclude=*
15 - --prune-empty-dirs
diff --git a/playbooks/legacy/puppet-beaker-rspec/run.yaml b/playbooks/legacy/puppet-beaker-rspec/run.yaml
deleted file mode 100644
index 048e0db..0000000
--- a/playbooks/legacy/puppet-beaker-rspec/run.yaml
+++ /dev/null
@@ -1,126 +0,0 @@
1- hosts: all
2 name: Autoconverted job legacy-puppet-beaker-rspec from old job gate-{name}-puppet-beaker-rspec-ubuntu-xenial
3 roles:
4 - bindep
5
6 tasks:
7
8 - name: Ensure legacy workspace directory
9 file:
10 path: '{{ ansible_user_dir }}/workspace'
11 state: directory
12
13 - shell:
14 cmd: |
15 set -e
16 set -x
17 CLONEMAP=`mktemp`
18 function cleanup {
19 # In cases where zuul-cloner is aborted during a git
20 # clone operation, git will remove the git work tree in
21 # its cleanup. The work tree in these jobs is the
22 # workspace directory, which means that subsequent
23 # jenkins post-build actions can not run because the
24 # workspace has been removed.
25 # To reduce the likelihood of this having an impact,
26 # recreate the workspace directory if needed
27 mkdir -p $WORKSPACE
28 rm -f $CLONEMAP
29 }
30 trap cleanup EXIT
31 cat > $CLONEMAP << EOF
32 clonemap:
33 - name: $ZUUL_PROJECT
34 dest: .
35 EOF
36 /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
37 git://git.openstack.org $ZUUL_PROJECT
38 executable: /bin/bash
39 chdir: '{{ ansible_user_dir }}/workspace'
40 environment: '{{ zuul | zuul_legacy_vars }}'
41
42 - shell:
43 cmd: |
44 set -e
45 set -x
46 ZUUL_BRANCH_REAL=${ZUUL_BRANCH:-master}
47 # Workaround for puppet-ceph, where we need to checkout
48 # puppet-openstack-integration from stable/pike when working on
49 # stable/jewel.
50 # Ceph Jewel works with Newton to Pike
51 if [[ "$ZUUL_BRANCH" == "stable/jewel" ]]; then
52 ZUUL_BRANCH_REAL='stable/pike'
53 fi
54 export ZUUL_REF=${ZUUL_REF:-None}
55 CLONEMAP=`mktemp`
56 function cleanup {
57 rm -f $CLONEMAP
58 }
59 trap cleanup EXIT
60 cat > $CLONEMAP << EOF
61 clonemap:
62 - name: openstack/puppet-openstack-integration
63 dest: puppet-openstack-integration
64 EOF
65 /usr/zuul-env/bin/zuul-cloner -m $CLONEMAP \
66 --cache-dir /opt/git \
67 --zuul-branch $ZUUL_BRANCH_REAL \
68 git://git.openstack.org openstack/puppet-openstack-integration
69 executable: /bin/bash
70 chdir: '{{ ansible_user_dir }}/workspace'
71 environment: '{{ zuul | zuul_legacy_vars }}'
72
73 - shell:
74 cmd: |
75 set -e
76 set -x
77 if [ -f /usr/bin/yum ]; then
78 sudo yum -y remove rdo-release "centos-release-openstack-*" "centos-release-ceph-*"
79 sudo yum -y install libxml2-devel libxslt-devel ruby-devel zlib-devel
80 sudo yum -y groupinstall "Development Tools"
81 # Uninstall python-requests from pip, since we install it in
82 # system-config/install_puppet.sh
83 sudo pip uninstall requests -y || true
84 elif [ -f /usr/bin/apt-get ]; then
85 sudo apt-get update
86 sudo apt-get install -y libxml2-dev libxslt-dev ruby-dev zlib1g-dev
87 fi
88 executable: /bin/bash
89 chdir: '{{ ansible_user_dir }}/workspace'
90 environment: '{{ zuul | zuul_legacy_vars }}'
91
92 - shell:
93 cmd: |
94 echo "" | sudo tee -a /etc/ssh/sshd_config
95 echo "Match address 127.0.0.1" | sudo tee -a /etc/ssh/sshd_config
96 echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
97 echo "" | sudo tee -a /etc/ssh/sshd_config
98 echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
99 echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
100 mkdir -p .ssh
101 ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P ""
102 sudo mkdir -p /root/.ssh
103 cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
104 if [ -f /usr/bin/yum ]; then
105 sudo systemctl reload sshd
106 elif [ -f /usr/bin/apt-get ]; then
107 sudo service ssh restart
108 fi
109 executable: /bin/bash
110 chdir: '{{ ansible_user_dir }}/workspace'
111 environment: '{{ zuul | zuul_legacy_vars }}'
112
113 - shell:
114 cmd: |
115 trap "puppet-openstack-integration/copy_logs.sh" EXIT
116 mkdir .bundled_gems
117 export GEM_HOME=`pwd`/.bundled_gems
118 gem install bundler --no-rdoc --no-ri --verbose
119 $GEM_HOME/bin/bundle install --retry 3
120 export BEAKER_set=nodepool-xenial
121 export BEAKER_debug=yes
122 export BEAKER_color=no
123 $GEM_HOME/bin/bundle exec rspec spec/acceptance
124 chdir: '{{ ansible_user_dir }}/workspace'
125 executable: /bin/bash
126 environment: '{{ zuul | zuul_legacy_vars }}'
diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml
index e9a8ba3..e5d8025 100644
--- a/zuul.d/jobs.yaml
+++ b/zuul.d/jobs.yaml
@@ -1234,6 +1234,109 @@
1234 puppet_version: 4 1234 puppet_version: 4
1235 1235
1236- job: 1236- job:
1237 name: puppet-beaker-rspec-infra
1238 description: |
1239 Base job for beaker-rspec tests for Infra's puppet modules
1240 nodeset: devstack-single-node
1241 run: playbooks/infra-puppet-beaker-rspec/run.yaml
1242 vars:
1243 nodeset: nodepool-xenial
1244 timeout: 3600
1245 irrelevant-files:
1246 - ^.*\.md$
1247 - ^.*\.rst$
1248 - ^doc/.*$
1249 - ^etc/.*$
1250 - ^metadata.json$
1251 - ^releasenotes/.*$
1252 - ^test-requirements.txt$
1253 required-projects:
1254 - openstack-infra/project-config
1255 - openstack-infra/system-config
1256 - openstack-infra/puppet-openstack_infra_spec_helper
1257 - openstack-infra/puppet-bugdaystats
1258 - openstack-infra/puppet-mysql_backup
1259 - openstack-infra/puppet-openstackci
1260 - openstack-infra/puppet-zuul
1261 - openstack-infra/puppet-mqtt_statsd
1262 - openstack-infra/puppet-meetbot
1263 - openstack-infra/puppet-hound
1264 - openstack-infra/puppet-pip
1265 - openstack-infra/puppet-os_client_config
1266 - openstack-infra/puppet-openstackid
1267 - openstack-infra/puppet-bandersnatch
1268 - openstack-infra/puppet-project_config
1269 - openstack-infra/puppet-grafyaml
1270 - openstack-infra/puppet-refstack
1271 - openstack-infra/puppet-github
1272 - openstack-infra/puppet-ethercalc
1273 - openstack-infra/puppet-unattended_upgrades
1274 - openstack-infra/puppet-openafs
1275 - openstack-infra/puppet-httpd
1276 - openstack-infra/puppet-drupal
1277 - openstack-infra/puppet-subunit2sql
1278 - openstack-infra/puppet-reviewday
1279 - openstack-infra/puppet-kibana
1280 - openstack-infra/puppet-redis
1281 - openstack-infra/puppet-phabricator
1282 - openstack-infra/puppet-ssl_cert_check
1283 - openstack-infra/puppet-lpmqtt
1284 - openstack-infra/puppet-germqtt
1285 - openstack-infra/puppet-cgit
1286 - openstack-infra/puppet-packagekit
1287 - openstack-infra/puppet-haveged
1288 - openstack-infra/puppet-graphite
1289 - openstack-infra/puppet-diskimage_builder
1290 - openstack-infra/puppet-sudoers
1291 - openstack-infra/puppet-stackalytics
1292 - openstack-infra/puppet-zanata
1293 - openstack-infra/puppet-logstash
1294 - openstack-infra/puppet-gerritbot
1295 - openstack-infra/puppet-asterisk
1296 - openstack-infra/puppet-statusbot
1297 - openstack-infra/puppet-gerrit
1298 - openstack-infra/puppet-mediawiki
1299 - openstack-infra/puppet-mailman
1300 - openstack-infra/puppet-exim
1301 - openstack-infra/puppet-tmpreaper
1302 - openstack-infra/puppet-elastic_recheck
1303 - openstack-infra/puppet-ulimit
1304 - openstack-infra/puppet-planet
1305 - openstack-infra/puppet-nodepool
1306 - openstack-infra/puppet-logrotate
1307 - openstack-infra/puppet-infracloud
1308 - openstack-infra/puppet-elasticsearch
1309 - openstack-infra/puppet-unbound
1310 - openstack-infra/puppet-storyboard
1311 - openstack-infra/puppet-openstack_health
1312 - openstack-infra/puppet-kerberos
1313 - openstack-infra/puppet-odsreg
1314 - openstack-infra/puppet-askbot
1315 - openstack-infra/puppet-log_processor
1316 - openstack-infra/puppet-simpleproxy
1317 - openstack-infra/puppet-iptables
1318 - openstack-infra/puppet-lodgeit
1319 - openstack-infra/puppet-etherpad_lite
1320 - openstack-infra/puppet-mosquitto
1321 - openstack-infra/puppet-bup
1322 - openstack-infra/puppet-pgsql_backup
1323 - openstack-infra/puppet-ansible
1324 - openstack-infra/puppet-ssh
1325 - openstack-infra/puppet-snmpd
1326 - openstack-infra/puppet-user
1327 - openstack-infra/puppet-jeepyb
1328 - openstack-infra/puppet-accessbot
1329 - openstack-infra/puppet-ptgbot
1330 - openstack-infra/puppet-jenkins
1331
1332- job:
1333 name: puppet-beaker-rspec-centos-7-infra
1334 parent: puppet-beaker-rspec-infra
1335 nodeset: centos-7
1336 vars:
1337 nodeset: nodepool-centos7
1338
1339- job:
1237 name: ansible-role-functional-base 1340 name: ansible-role-functional-base
1238 abstract: true 1341 abstract: true
1239 parent: tox 1342 parent: tox
diff --git a/zuul.d/project-templates.yaml b/zuul.d/project-templates.yaml
index ad700e2..f614f12 100644
--- a/zuul.d/project-templates.yaml
+++ b/zuul.d/project-templates.yaml
@@ -1036,3 +1036,28 @@
1036 jobs: 1036 jobs:
1037 - golang-fmt 1037 - golang-fmt
1038 - golang-unit 1038 - golang-unit
1039
1040- project-template:
1041 name: puppet-beaker-jobs-xenial-infra
1042 check:
1043 jobs:
1044 - puppet-beaker-rspec-infra
1045 gate:
1046 jobs:
1047 - puppet-beaker-rspec-infra
1048
1049- project-template:
1050 name: puppet-beaker-jobs-xenial-infra-nv
1051 check:
1052 jobs:
1053 - puppet-beaker-rspec-infra:
1054 voting: false
1055
1056- project-template:
1057 name: puppet-beaker-jobs-centos-7-infra
1058 check:
1059 jobs:
1060 - puppet-beaker-rspec-centos-7-infra
1061 gate:
1062 jobs:
1063 - puppet-beaker-rspec-centos-7-infra
diff --git a/zuul.d/zuul-legacy-jobs.yaml b/zuul.d/zuul-legacy-jobs.yaml
index 3d2eb2e..b6c1405 100644
--- a/zuul.d/zuul-legacy-jobs.yaml
+++ b/zuul.d/zuul-legacy-jobs.yaml
@@ -1577,87 +1577,6 @@
1577 - ^test-requirements.txt$ 1577 - ^test-requirements.txt$
1578 1578
1579- job: 1579- job:
1580 name: legacy-puppet-beaker-rspec-infra
1581 parent: legacy-puppet-beaker-rspec
1582 required-projects:
1583 - openstack-infra/project-config
1584 - openstack-infra/system-config
1585 - openstack-infra/puppet-bugdaystats
1586 - openstack-infra/puppet-mysql_backup
1587 - openstack-infra/puppet-openstackci
1588 - openstack-infra/puppet-zuul
1589 - openstack-infra/puppet-mqtt_statsd
1590 - openstack-infra/puppet-meetbot
1591 - openstack-infra/puppet-hound
1592 - openstack-infra/puppet-pip
1593 - openstack-infra/puppet-os_client_config
1594 - openstack-infra/puppet-openstackid
1595 - openstack-infra/puppet-bandersnatch
1596 - openstack-infra/puppet-project_config
1597 - openstack-infra/puppet-grafyaml
1598 - openstack-infra/puppet-refstack
1599 - openstack-infra/puppet-github
1600 - openstack-infra/puppet-ethercalc
1601 - openstack-infra/puppet-unattended_upgrades
1602 - openstack-infra/puppet-openafs
1603 - openstack-infra/puppet-httpd
1604 - openstack-infra/puppet-drupal
1605 - openstack-infra/puppet-subunit2sql
1606 - openstack-infra/puppet-reviewday
1607 - openstack-infra/puppet-kibana
1608 - openstack-infra/puppet-redis
1609 - openstack-infra/puppet-phabricator
1610 - openstack-infra/puppet-ssl_cert_check
1611 - openstack-infra/puppet-lpmqtt
1612 - openstack-infra/puppet-germqtt
1613 - openstack-infra/puppet-cgit
1614 - openstack-infra/puppet-packagekit
1615 - openstack-infra/puppet-haveged
1616 - openstack-infra/puppet-graphite
1617 - openstack-infra/puppet-diskimage_builder
1618 - openstack-infra/puppet-sudoers
1619 - openstack-infra/puppet-stackalytics
1620 - openstack-infra/puppet-zanata
1621 - openstack-infra/puppet-logstash
1622 - openstack-infra/puppet-gerritbot
1623 - openstack-infra/puppet-asterisk
1624 - openstack-infra/puppet-statusbot
1625 - openstack-infra/puppet-gerrit
1626 - openstack-infra/puppet-mediawiki
1627 - openstack-infra/puppet-mailman
1628 - openstack-infra/puppet-exim
1629 - openstack-infra/puppet-tmpreaper
1630 - openstack-infra/puppet-elastic_recheck
1631 - openstack-infra/puppet-ulimit
1632 - openstack-infra/puppet-planet
1633 - openstack-infra/puppet-nodepool
1634 - openstack-infra/puppet-logrotate
1635 - openstack-infra/puppet-infracloud
1636 - openstack-infra/puppet-elasticsearch
1637 - openstack-infra/puppet-unbound
1638 - openstack-infra/puppet-storyboard
1639 - openstack-infra/puppet-openstack_health
1640 - openstack-infra/puppet-kerberos
1641 - openstack-infra/puppet-odsreg
1642 - openstack-infra/puppet-askbot
1643 - openstack-infra/puppet-log_processor
1644 - openstack-infra/puppet-simpleproxy
1645 - openstack-infra/puppet-iptables
1646 - openstack-infra/puppet-lodgeit
1647 - openstack-infra/puppet-etherpad_lite
1648 - openstack-infra/puppet-mosquitto
1649 - openstack-infra/puppet-bup
1650 - openstack-infra/puppet-pgsql_backup
1651 - openstack-infra/puppet-ansible
1652 - openstack-infra/puppet-ssh
1653 - openstack-infra/puppet-snmpd
1654 - openstack-infra/puppet-user
1655 - openstack-infra/puppet-jeepyb
1656 - openstack-infra/puppet-accessbot
1657 - openstack-infra/puppet-ptgbot
1658 - openstack-infra/puppet-jenkins
1659
1660- job:
1661 name: legacy-puppet-beaker-rspec-centos-7 1580 name: legacy-puppet-beaker-rspec-centos-7
1662 parent: legacy-puppet-openstack-integration 1581 parent: legacy-puppet-openstack-integration
1663 run: playbooks/legacy/puppet-beaker-rspec-centos-7/run.yaml 1582 run: playbooks/legacy/puppet-beaker-rspec-centos-7/run.yaml
@@ -1676,13 +1595,6 @@
1676 - ^test-requirements.txt$ 1595 - ^test-requirements.txt$
1677 1596
1678- job: 1597- job:
1679 name: legacy-puppet-beaker-rspec-centos-7-infra
1680 parent: legacy-puppet-beaker-rspec-infra
1681 run: playbooks/legacy/puppet-beaker-rspec-centos-7/run.yaml
1682 post-run: playbooks/legacy/puppet-beaker-rspec-centos-7/post.yaml
1683 nodeset: legacy-centos-7
1684
1685- job:
1686 name: legacy-puppet-httpd-forge-upload 1598 name: legacy-puppet-httpd-forge-upload
1687 parent: legacy-base 1599 parent: legacy-base
1688 run: playbooks/legacy/puppet-httpd-forge-upload/run.yaml 1600 run: playbooks/legacy/puppet-httpd-forge-upload/run.yaml
diff --git a/zuul.d/zuul-legacy-project-templates.yaml b/zuul.d/zuul-legacy-project-templates.yaml
index b279d1e..8523828 100644
--- a/zuul.d/zuul-legacy-project-templates.yaml
+++ b/zuul.d/zuul-legacy-project-templates.yaml
@@ -117,7 +117,8 @@
117 jobs: 117 jobs:
118 - legacy-tempest-dsvm-neutron-src-plugin 118 - legacy-tempest-dsvm-neutron-src-plugin
119 119
120- project-template: 120
121- project-template: # Used by puppet-midonet
121 name: puppet-beaker-jobs 122 name: puppet-beaker-jobs
122 check: 123 check:
123 jobs: 124 jobs:
@@ -127,31 +128,6 @@
127 - legacy-puppet-beaker-rspec-centos-7 128 - legacy-puppet-beaker-rspec-centos-7
128 129
129- project-template: 130- project-template:
130 name: puppet-beaker-jobs-xenial-infra
131 check:
132 jobs:
133 - legacy-puppet-beaker-rspec-infra
134 gate:
135 jobs:
136 - legacy-puppet-beaker-rspec-infra
137
138- project-template:
139 name: puppet-beaker-jobs-xenial-infra-nv
140 check:
141 jobs:
142 - legacy-puppet-beaker-rspec-infra:
143 voting: false
144
145- project-template:
146 name: puppet-beaker-jobs-centos-7-infra
147 check:
148 jobs:
149 - legacy-puppet-beaker-rspec-centos-7-infra
150 gate:
151 jobs:
152 - legacy-puppet-beaker-rspec-centos-7-infra
153
154- project-template:
155 name: puppet-module-unit-jobs 131 name: puppet-module-unit-jobs
156 check: 132 check:
157 jobs: 133 jobs: