Add jobs for project-config

Rather than tieing this to the migration, just do them.

The afs package build script changed slightly - it now publishes to
tarballs.openstack.org/project-config/package-afs-centos7 instead of
tarballs.openstack.org/package-afs-centos7 so that the normal artifact
publication base job can be used.

The existing package-afs-centos7 has been copied on tarballs.openstack.org to
project-config/package-afs-centos7 so that this will not cause a rebuild.

Change-Id: I7cfb90df4eb49defce7aa41453918347a2c6742e
This commit is contained in:
Monty Taylor 2017-09-26 09:02:58 -05:00
parent 11452cfc58
commit 3cc6b848cf
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
3 changed files with 158 additions and 0 deletions

View File

@ -0,0 +1,14 @@
- hosts: all
tasks:
- name: Ensure artifacts directory exists
file:
state: directory
path: '{{ zuul.executor.work_root }}/artifacts/package-afs-centos7'
delegate_to: localhost
- name: Copy RPMs back for publication
synchronize:
src: '{{ ansible_user_dir }}/rpmbuild/RPMS/x86_64'
dest: '{{ zuul.executor.work_root }}/artifacts/package-afs-centos7'
mode: pull

View File

@ -0,0 +1,44 @@
- hosts: all
tasks:
- name: Build Centos packages of OpenAFS
shell: |
set -eux
# TODO: fedora
YUM=${YUM:-yum}
VERSION=1.6.16
SRC_VERSION=${VERSION}-1
SRC_RPM=openafs-${SRC_VERSION}.src.rpm
SRC_URL=https://www.openafs.org/dl/openafs/${VERSION}/${SRC_RPM}
UPSTREAM_BASE=https://tarballs.openstack.org/project-config/package-afs-centos7
UPSTREAM_CHECK=${UPSTREAM_BASE}/openafs-client-${SRC_VERSION}.el7.centos.x86_64.rpm
if wget -O/dev/null -q $UPSTREAM_CHECK; then
echo "Found existing upstream RPM build, nothing to do"
# scp should just publish nothing
exit 0
fi
# some common prereqs
sudo yum -y groupinstall "Development Tools" "Development Libraries"
sudo yum -y install rpm-build kernel-devel createrepo
wget $SRC_URL
# install the build dependencies for the package
sudo yum-builddep -y ./${SRC_RPM}
# install source-rpm
# (this installs to ~/rpmbuild)
rpm -i ./${SRC_RPM}
# build everything
pushd ~/rpmbuild/SPECS/
rpmbuild -ba ./openafs.spec
popd
# create final repo for copying
createrepo ~/rpmbuild/RPMS/x86_64
args:
executable: /bin/bash

View File

@ -372,3 +372,103 @@
- openstack/puppet-vitrage
- openstack/puppet-watcher
- openstack/puppet-zaqar
- job:
name: project-config-gerrit
parent: tox
vars:
tox_envlist: gerrit
files:
- ^gerrit/acls/.*$
- bindep.txt
- check_valid_gerrit_projects.py
- gerrit/projects.yaml
- other-requirements.txt
- tools/check_projects_yaml_alphabetized.sh
- tools/check_valid_gerrit_config.sh
- tox.ini
- job:
name: project-config-grafyaml
parent: tox
vars:
tox_envlist: grafyaml
files:
- ^grafana/.*$
- bindep.txt
- other-requirements.txt
- tools/grafyaml-validate.sh
- tox.ini
- job:
name: project-config-irc-access
parent: tox
vars:
tox_envlist: irc
files:
- bindep.txt
- accessbot/channels.yaml
- gerritbot/channels.yaml
- other-requirements.txt
- tools/check_irc_access.py
- tools/check_channels_yaml.sh
- tools/irc_tests.py
- tools/normalize_channels_yaml.py
- tools/projectconfig_yamllib.py
- tox.ini
- job:
name: project-config-nodepool
parent: tox
vars:
tox_envlist: nodepool
files:
- ^nodepool/nodepool.yaml
- bindep.txt
- other-requirements.txt
- tox.ini
- job:
name: build-openstack-specs-site
parent: tox
vars:
tox_envlist: specs
files:
- bindep.txt
- specs/.*
- other-requirements.txt
- tox.ini
- job:
name: project-config-dib
parent: tox
vars:
tox_envlist: dib
files:
- ^nodepool/elements/.*$
- bindep.txt
- other-requirements.txt
- tox.ini
- job:
name: project-config-infra-docs-index
parent: tox
vars:
tox_envlist: infra-docs
files:
- 'bindep.txt'
- 'docs-site/.*'
- 'other-requirements.txt'
- 'tox.ini'
- job:
name: project-config-build-openafs-centos
description: |
There are no official builds for AFS on Centos 7, hence
we build our own and publish them to tarballs.openstack.org
for our centos hosts that need access to the mirror to
consume.
parent: publish-openstack-artifacts
run: playbooks/package-afs-centos/run
post-run: playbooks/package-afs-centos/post
nodeset: centos-7