project-config/jenkins/jobs/anvil-jobs.yaml
Paul Belanger 864ae75814
Ensure console-log is our last publisher
This is related to zuulv25, we make sure console-log is the last
publisher to ensure zuul-launcher logs are also uploaded.

This will be done over a series of commits to reduce the work load on
jenkins.

Change-Id: I8b69b23a8f8f11a1cde2dc5ab9730ef850abbd54
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-06-15 10:00:47 -04:00

132 lines
3.7 KiB
YAML

- job-template:
name: 'gate-anvil-rpms-dsvm-{node}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- gerrit-git-prep
- install-distro-packages
- shell: |
#!/bin/bash -xe
export PYTHONUNBUFFERED=true
# Disable terminal output coloring...
export LOG_COLOR=0
# System package installing doesn't work (all needed packages
# already exist) so skip it and do this manually for the time
# being...
export SKIP_BOOTSTRAP=1
# TODO: Change this later.
origin_file="kilo-2015.1.0.yaml"
echo "--------------------------"
echo "Bootstrapping anvil (rpms)"
echo "--------------------------"
cat /etc/redhat-release
# Install a few needed rpms that appear to be missing...
sudo yum install -y createrepo yum-utils rpm-build libffi-devel
# Fix a few really old build-it system packages...
#
# Someday this will not be a problem...
#
# See: https://bugs.launchpad.net/anvil/+bug/1482696
sudo pip install six --upgrade
echo "------------------------"
echo "Boostrapping anvils venv"
echo "------------------------"
virtualenv .venv
source .venv/bin/activate
pip --version
pip install -r requirements.txt
pip freeze
deactivate
./smithy -a moo --tee-file ./moo.txt
echo "---------"
echo "Preparing"
echo "---------"
./smithy -a prepare -o conf/origins/$origin_file \
--tee-file ./prepare.txt -j1 -v \
-d ./openstack
echo "--------"
echo "Building"
echo "--------"
sudo ./smithy -a build -o conf/origins/$origin_file \
--tee-file ./build.txt -j1 -v \
-d ./openstack
echo ":)"
publishers:
- scp:
site: 'static.openstack.org'
files:
- target: 'logs/$LOG_PATH'
source: 'openstack/deps/output/**'
keep-hierarchy: false
copy-after-failure: true
- console-log
- job-template:
name: 'gate-anvil-venv-{node}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- gerrit-git-prep
- install-distro-packages
- shell: |
#!/bin/bash -xe
export PYTHONUNBUFFERED=true
# Disable terminal output coloring...
export LOG_COLOR=0
# TODO: Change this later.
origin_file="kilo-venv-2015.1.0.yaml"
echo "--------------------------"
echo "Bootstrapping anvil (venv)"
echo "--------------------------"
sudo -H ./smithy --bootstrap
# For now remove the pip cache/build cache locally built using sudo,
# as it causes permission problems...
sudo rm -rf ~/.pip/cache/ $PWD/build/
echo "---------"
echo "Preparing"
echo "---------"
./smithy -a prepare -o conf/origins/$origin_file \
-p conf/personas/in-a-box/venv-all.yaml \
--tee-file ./prepare.txt -j1 -v \
-d ./openstack
echo ":)"
publishers:
- scp:
site: 'static.openstack.org'
files:
- target: 'logs/$LOG_PATH'
source: 'openstack/deps/output/**'
keep-hierarchy: false
copy-after-failure: true
- console-log