Remove old infra team puppet testing

The OpenDev team is planning on removing Ubuntu Xenial in the nearish
future. One of the things still running on Xenial is our old puppet
testing. We've decided taht we'll just have to manually manage those
nodes going forward without CI as there are few of them at this point
and we really want to clean up old Ubuntus in nodepool and our mirrors.

There is a risk that this will allow things to break without detection
or otherwise create new problems, but this stuff has been neglected so
that risk was there anyway.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/912309
Change-Id: I722bd1ab4fb7c0dfc2864ee55a64c4cf4dfec195
This commit is contained in:
Clark Boylan 2024-03-08 13:07:34 -08:00
parent c24b26ae7f
commit f7bcc4dcaa
4 changed files with 0 additions and 170 deletions

View File

@ -1,100 +0,0 @@
- hosts: all
name: Autoconverted job legacy-puppet-lint from old job gate-{name}-puppet-lint
roles:
- bindep
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
CLONEMAP=`mktemp`
function cleanup {
# In cases where zuul-cloner is aborted during a git
# clone operation, git will remove the git work tree in
# its cleanup. The work tree in these jobs is the
# workspace directory, which means that subsequent
# jenkins post-build actions can not run because the
# workspace has been removed.
# To reduce the likelihood of this having an impact,
# recreate the workspace directory if needed
mkdir -p $WORKSPACE
rm -f $CLONEMAP
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: $ZUUL_PROJECT
dest: .
EOF
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP --cache-dir /opt/git \
https://opendev.org $ZUUL_PROJECT
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
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
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -x
sudo rm -f /etc/sudoers.d/zuul
# Prove that general sudo access is actually revoked
! sudo -n true
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
if [ -f Modulefile -o -f metadata.json ]; then
if [ -f Modulefile ]; then
MODULE=$(awk '/^name/ {print $NF}' Modulefile |tr -d \"\')
elif [ -f metadata.json ]; then
MODULE=$(python -c 'import json;print json.load(open("metadata.json"))["name"]')
fi
if [ -z "$MODULE" ]; then
echo "Module name not defined in Modulefile or metadata.json"
else
mkdir -p "$MODULE"
rsync -a --exclude="$MODULE" --exclude ".*" . "$MODULE"
cd "$MODULE"
fi
fi
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
if [ -f Gemfile ]; then
gem install bundler --no-rdoc --no-ri --verbose --version '<2.0.0'
$GEM_HOME/bin/bundle install --without system_tests
$GEM_HOME/bin/bundle exec rake lint 2>&1
else
gem install rake -n ./.bundled_gems/
gem install puppet-lint
gem install puppetlabs_spec_helper
./.bundled_gems/rake lint 2>&1
fi
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -1,49 +0,0 @@
- hosts: all
name: Autoconverted job legacy-puppet-openstack-infra-spec-helper-unit from old
job gate-puppet-openstack-infra-spec-helper-unit-ubuntu-xenial
roles:
- bindep
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
https://opendev.org opendev/puppet-openstack_infra_spec_helper
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
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
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cd opendev/puppet-openstack_infra_spec_helper
./run_unit_tests.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'

View File

@ -296,19 +296,6 @@
- openstack/neutron-dynamic-routing
- openstack/tempest
- job:
name: legacy-puppet-lint
parent: legacy-base
run: playbooks/legacy/puppet-lint/run.yaml
timeout: 1800
nodeset: ubuntu-xenial
- job:
name: legacy-puppet-openstack-infra-spec-helper-unit
parent: legacy-base
run: playbooks/legacy/puppet-openstack-infra-spec-helper-unit/run.yaml
timeout: 3600
- job:
name: legacy-sandbox-tag
parent: legacy-base

View File

@ -1,8 +0,0 @@
- project-template:
name: infra-puppet-check-jobs
check:
jobs:
- legacy-puppet-lint
gate:
jobs:
- legacy-puppet-lint