Switch to image building jobs from ironic-python-agent-builder

Depends-On: https://review.opendev.org/678884
Change-Id: I50a9f9dc15f3a782aaf4b8c4096a418136f4ebd4
This commit is contained in:
Dmitry Tantsur 2019-08-28 17:29:31 +02:00
parent e446a5e6c4
commit e73786af90
6 changed files with 10 additions and 158 deletions

View File

@ -1,6 +1,5 @@
ironic-python-agent images
==========================
coreos - Builds a CoreOS Ramdisk and Kernel suitable for running
ironic-python-agent
The content has been moved to `ironic-python-agent-builder
<https://docs.openstack.org/ironic-python-agent-builder>`_.

View File

@ -1,43 +0,0 @@
- hosts: all
tasks:
- name: Ensure artifacts directory exists
file:
path: '{{ zuul.executor.work_root }}/artifacts/{{ image_name }}/files'
state: directory
delegate_to: localhost
- name: Copy files from {{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent on node
synchronize:
src: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_RAW/'
dest: '{{ zuul.executor.work_root }}/artifacts/{{ image_name }}/files/'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent on node
synchronize:
src: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR/'
dest: '{{ zuul.executor.work_root }}/artifacts/{{ image_name }}/'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/*
- --prune-empty-dirs
- name: Copy files from {{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent on node
synchronize:
src: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true
rsync_opts:
- --include=/testrepository.subunit.gz
- --include=*/
- --exclude=*
- --prune-empty-dirs

View File

@ -1,19 +0,0 @@
- hosts: all
tasks:
- name: Install binary dependencies from diskimage-builder
include_role:
name: bindep
vars:
bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/diskimage-builder'].src_dir }}"
- name: Install requirements for ironic-python-agent-builder
pip:
requirements: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/ironic-python-agent-builder'].src_dir }}/requirements.txt"
extra_args: -c "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
become: true
- name: Install ironic-python-agent-builder
pip:
name: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/ironic-python-agent-builder'].src_dir }}"
become: true

View File

@ -1,60 +0,0 @@
- hosts: all
tasks:
- shell:
cmd: |
set -e
set -x
BRANCH={{ zuul.branch }}
export BRANCH_PATH=`echo $BRANCH | tr / -`
mkdir UPLOAD_RAW
mkdir UPLOAD_TAR
JOBNAME='ironic-python-agent-buildimage-{{ image_name }}'
TRANS_START_TIME=$(date +%s)
SUBUNIT_OUTPUT=testrepository.subunit
ERRORS=1
VENV=$(mktemp -d)
virtualenv $VENV
$VENV/bin/pip install -U os-testr
trap "finish" EXIT
function finish {
if [[ "$ERRORS" -eq 1 ]]; then
$VENV/bin/generate-subunit $TRANS_START_TIME $SECONDS 'fail' $JOBNAME >> $SUBUNIT_OUTPUT
else
$VENV/bin/generate-subunit $TRANS_START_TIME $SECONDS 'success' $JOBNAME >> $SUBUNIT_OUTPUT
fi
gzip -9 $SUBUNIT_OUTPUT
if [ "$VENV" != "" ] ; then
rm -rf $VENV
VENV=""
fi
}
type='{{ image_name }}'
case $type in
tinyipa)
export BUILD_AND_INSTALL_TINYIPA=true
export IPA_SOURCE_DIR={{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent
pushd {{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent-builder/tinyipa
make
mv tinyipa*.tar.gz* "$IPA_SOURCE_DIR/UPLOAD_TAR"
mv tinyipa*.* "$IPA_SOURCE_DIR/UPLOAD_RAW"
mv tiny-instance-uec*.tar.gz "$IPA_SOURCE_DIR/UPLOAD_TAR"
# NOTE(sambetts) Must clean up chroot directories before
# publisher rsync command tries and fails to read them
make clean
popd
;;
dib)
NAME=ipa-{{ image_distro }}-$BRANCH_PATH
ironic-python-agent-builder -e dhcp-all-interfaces -o $NAME {{ image_distro }}
tar -czf UPLOAD_TAR/$NAME.tar.gz ${NAME}*
mv ${NAME}* "$IPA_SOURCE_DIR/UPLOAD_RAW"
;;
esac
ERRORS=0
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent'

View File

@ -86,37 +86,6 @@
devstack_plugins:
ironic-inspector: https://opendev.org/openstack/ironic-inspector
- job:
name: ironic-python-agent-buildimage-base
parent: publish-openstack-artifacts
run: playbooks/ironic-python-agent-buildimage/run.yaml
post-run: playbooks/ironic-python-agent-buildimage/post.yaml
timeout: 1800
required-projects:
- openstack/requirements
- openstack/ironic-python-agent
- openstack/ironic-python-agent-builder
- job:
name: ironic-python-agent-buildimage-tinyipa
parent: ironic-python-agent-buildimage-base
vars:
image_name: 'tinyipa'
# TODO(dtantsur): refactor run.yaml, so that this variable is only
# required for DIB jobs.
image_distro: ''
- job:
name: ironic-python-agent-buildimage-dib
parent: ironic-python-agent-buildimage-base
pre-run: playbooks/ironic-python-agent-buildimage/pre-dib.yaml
required-projects:
# NOTE(dtantsur): used for bindep only
- openstack/diskimage-builder
vars:
image_name: 'dib'
image_distro: 'centos7'
# Experimental jobs
- job:

View File

@ -13,6 +13,12 @@
- ipa-tempest-wholedisk-bios-ipmi-direct-tinyipa-src
- ipa-tempest-wholedisk-bios-ipmi-iscsi-tinyipa-src
- ironic-standalone-ipa-src
# NOTE(dtantsur): non-voting because IPA source code is very unlikely
# to break them. They rather serve as a canary for broken POST jobs.
- ironic-python-agent-check-image-tinyipa:
voting: false
- ironic-python-agent-check-image-dib-centos7:
voting: false
# Non-voting jobs
- ipa-tempest-ironic-inspector-src:
voting: false
@ -38,5 +44,5 @@
- ipa-tempest-dsvm-partition-ipmi-iscsi-tinyipa-python3
post:
jobs:
- ironic-python-agent-buildimage-tinyipa
- ironic-python-agent-buildimage-dib
- ironic-python-agent-build-image-tinyipa
- ironic-python-agent-build-image-dib-centos7