b417bb15ab
'sudo' access is needed by copy_puppet_logs.sh which is run in copy_puppet_logs publisher on beaker upgrade jobs. This patch avoids to revoke sudo so we can use sudo to copy OpenStack & Systems logs and configurations. Change-Id: Ice5c4d7cd0c75ddfb869317f533ef734d40b433d
253 lines
6.4 KiB
YAML
253 lines
6.4 KiB
YAML
- job-template:
|
|
name: 'gate-{name}-puppet-unit-{puppet_version}-dsvm-{ostype}'
|
|
node: 'devstack-{ostype}'
|
|
|
|
builders:
|
|
- puppet-prepare-node
|
|
- gerrit-git-prep
|
|
- revoke-sudo
|
|
- shell: |
|
|
if [ "{puppet_version}" != "latest" ]; then
|
|
export PUPPET_GEM_VERSION='~> {puppet_version}.0'
|
|
fi
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
gem install bundler --no-rdoc --no-ri --verbose
|
|
$GEM_HOME/bin/bundle install
|
|
$GEM_HOME/bin/bundle exec rake spec SPEC_OPTS='--format documentation'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 60
|
|
- timestamps
|
|
|
|
publishers:
|
|
- console-log
|
|
|
|
|
|
- job-template:
|
|
name: 'gate-{name}-puppet-beaker-rspec-dsvm-{ostype}'
|
|
node: 'devstack-{ostype}'
|
|
|
|
builders:
|
|
- link-logs
|
|
- puppet-prepare-node
|
|
- gerrit-git-prep
|
|
- allow-local-ssh-root
|
|
- revoke-sudo
|
|
- shell: |
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
gem install bundler --no-rdoc --no-ri --verbose
|
|
$GEM_HOME/bin/bundle install
|
|
export BEAKER_set=nodepool-{ostype}
|
|
export BEAKER_debug=yes
|
|
export BEAKER_color=no
|
|
$GEM_HOME/bin/bundle exec rspec spec/acceptance
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 60
|
|
- timestamps
|
|
|
|
publishers:
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: 'gate-{name}-puppet-beaker-rspec-upgrade-dsvm-{ostype}'
|
|
node: 'devstack-{ostype}'
|
|
|
|
builders:
|
|
- link-logs
|
|
- puppet-prepare-node
|
|
- allow-local-ssh-root
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
# checkout the current branch
|
|
/usr/zuul-env/bin/zuul-cloner \
|
|
--cache-dir /opt/git \
|
|
--workspace $WORKSPACE/new \
|
|
git://git.openstack.org $ZUUL_PROJECT
|
|
|
|
cd $WORKSPACE/new/$ZUUL_PROJECT
|
|
# for debugging:
|
|
git branch -r
|
|
OLD_BRANCH=$(git branch -r |grep -E 'origin.*stable' |sed -e 's/ origin\///' | sort -d | tail -1)
|
|
|
|
# checkout the stable branch
|
|
/usr/zuul-env/bin/zuul-cloner \
|
|
--cache-dir /opt/git \
|
|
--workspace $WORKSPACE/old \
|
|
--branch $OLD_BRANCH \
|
|
git://git.openstack.org $ZUUL_PROJECT
|
|
|
|
# install and test the stable branch
|
|
cd $WORKSPACE/old/$ZUUL_PROJECT
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
export BEAKER_set=nodepool-{ostype}
|
|
export BEAKER_debug=yes
|
|
export BEAKER_color=no
|
|
gem install bundler --no-rdoc --no-ri --verbose
|
|
$GEM_HOME/bin/bundle install
|
|
$GEM_HOME/bin/bundle exec rspec spec/acceptance
|
|
|
|
# upgrade and test the current branch
|
|
cd $WORKSPACE/new/$ZUUL_PROJECT
|
|
mkdir -p .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
export BEAKER_provision=no
|
|
gem install bundler --no-rdoc --no-ri --verbose
|
|
$GEM_HOME/bin/bundle update
|
|
$GEM_HOME/bin/bundle exec rspec spec/acceptance
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 60
|
|
- timestamps
|
|
|
|
publishers:
|
|
- copy-puppet-logs
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: '{name}-forge-upload'
|
|
node: release
|
|
|
|
builders:
|
|
- revoke-sudo
|
|
- gerrit-git-prep
|
|
- shell: |
|
|
#!/bin/bash
|
|
cat > Rakefile << EOF
|
|
require 'puppet_blacksmith/rake_tasks'
|
|
EOF
|
|
TAG=${{ZUUL_REF:10}}
|
|
sed -i -e 's/ "version":.*/ "version": "'$TAG'",/' metadata.json
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
gem install --no-ri --no-rdoc puppetlabs_spec_helper puppet-blacksmith
|
|
rake module:push
|
|
|
|
publishers:
|
|
- console-log
|
|
|
|
|
|
- job-template:
|
|
name: 'gate-{name}-puppet-lint'
|
|
node: '{node}'
|
|
|
|
builders:
|
|
- revoke-sudo
|
|
- gerrit-git-prep
|
|
- puppet-lint
|
|
|
|
publishers:
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: 'gate-{name}-puppet-syntax'
|
|
node: '{node}'
|
|
|
|
builders:
|
|
- revoke-sudo
|
|
- gerrit-git-prep
|
|
- puppet-syntax
|
|
|
|
publishers:
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: 'gate-{name}-puppet-syntax-{puppet_version}-dsvm-{ostype}'
|
|
node: 'devstack-{ostype}'
|
|
|
|
builders:
|
|
- puppet-prepare-node
|
|
- gerrit-git-prep
|
|
- revoke-sudo
|
|
- shell: |
|
|
export PUPPET_GEM_VERSION='~> {puppet_version}'
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
gem install bundler --no-rdoc --no-ri --verbose
|
|
$GEM_HOME/bin/bundle install
|
|
# FUTURE_PARSER=yes is only supported by Puppet 3.x
|
|
if [ "{puppet_version}" -lt "4" ]; then
|
|
export FUTURE_PARSER=yes
|
|
fi
|
|
$GEM_HOME/bin/bundle exec rake syntax
|
|
|
|
publishers:
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: 'gate-puppet-openstack-integration-dsvm-{ostype}'
|
|
node: 'devstack-{ostype}'
|
|
|
|
builders:
|
|
- link-logs
|
|
- zuul-clone:
|
|
project: openstack/puppet-openstack-integration
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
cd openstack/puppet-openstack-integration
|
|
mkdir .bundled_gems
|
|
export GEM_HOME=`pwd`/.bundled_gems
|
|
gem install bundler --no-rdoc --no-ri --verbose
|
|
./run_tests.sh
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 60
|
|
- timestamps
|
|
|
|
publishers:
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-group:
|
|
name: 'puppet-check-jobs'
|
|
puppet_version:
|
|
- 3
|
|
- 4
|
|
ostype:
|
|
- centos7
|
|
jobs:
|
|
- 'gate-{name}-puppet-lint'
|
|
- 'gate-{name}-puppet-syntax'
|
|
- 'gate-{name}-puppet-syntax-{puppet_version}-dsvm-{ostype}'
|
|
|
|
- job-group:
|
|
name: 'puppet-module-unit'
|
|
puppet_version:
|
|
- 3.3
|
|
- 3.4
|
|
- 3.6
|
|
- 3.7
|
|
- 3.8
|
|
- 4.0
|
|
- 'latest'
|
|
ostype:
|
|
- centos7
|
|
jobs:
|
|
- 'gate-{name}-puppet-unit-{puppet_version}-dsvm-{ostype}'
|
|
|
|
- job-group:
|
|
name: 'puppet-beaker-jobs'
|
|
ostype:
|
|
- trusty
|
|
- centos7
|
|
jobs:
|
|
- 'gate-{name}-puppet-beaker-rspec-dsvm-{ostype}'
|
|
- 'gate-{name}-puppet-beaker-rspec-upgrade-dsvm-{ostype}'
|
|
|
|
- job-group:
|
|
name: 'puppet-openstack-integration-jobs'
|
|
ostype:
|
|
- trusty
|
|
- centos7
|
|
jobs:
|
|
- 'gate-puppet-openstack-integration-dsvm-{ostype}'
|