openstack-zuul-jobs/playbooks/legacy/openstackci-beaker/run.yaml
Monty Taylor a3139c4bb5 Migrate jobs from zuulv2 to zuulv3
This is the result of having run the zuul migration tool.

Depends-On: I72687a56285a3d733a9adeaf3dc037a1ac95efd3
Change-Id: Ib511da75908e152e72fdf0d7b496f4fa98f9c223
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-26 15:02:59 -04:00

88 lines
3.2 KiB
YAML

- hosts: all
name: Autoconverted job legacy-openstackci-beaker from old job gate-openstackci-beaker-ubuntu-xenial
tasks:
- shell:
cmd: sudo pip install "pip<8" "virtualenv<14"
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
git://git.openstack.org openstack-infra/puppet-openstackci
executable: /bin/bash
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
git://git.openstack.org openstack-infra/puppet-openstack_infra_spec_helper
executable: /bin/bash
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
if [ -f /usr/bin/yum ]; then
sudo yum -y remove rdo-release "centos-release-openstack-*" "centos-release-ceph-*"
sudo yum -y install libxml2-devel libxslt-devel ruby-devel zlib-devel
sudo yum -y groupinstall "Development Tools"
# Uninstall python-requests from pip, since we install it in
# system-config/install_puppet.sh
sudo pip uninstall requests -y || true
elif [ -f /usr/bin/apt-get ]; then
sudo apt-get update
sudo apt-get install -y libxml2-dev libxslt-dev ruby-dev zlib1g-dev
fi
executable: /bin/bash
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
echo "" | sudo tee -a /etc/ssh/sshd_config
echo "Match address 127.0.0.1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
echo "" | sudo tee -a /etc/ssh/sshd_config
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
mkdir -p .ssh
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -P ""
sudo mkdir -p /root/.ssh
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
if [ -f /usr/bin/yum ]; then
sudo systemctl reload sshd
elif [ -f /usr/bin/apt-get ]; then
sudo service ssh restart
fi
executable: /bin/bash
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
sudo gem install bundler --no-rdoc --no-ri --verbose
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -x
sudo rm -f /etc/sudoers.d/jenkins-sudo
# Prove that general sudo access is actually revoked
! sudo -n true
executable: /bin/bash
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
cd openstack-infra/puppet-openstackci
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
bundle install
export BEAKER_set=nodepool-xenial
export BEAKER_debug=yes
export BEAKER_color=no
bundle exec rspec spec/acceptance
environment: '{{ zuul | zuul_legacy_vars }}'