project-config/jenkins/jobs/puppet-module-jobs.yaml
Spencer Krum f4a0a15942 Enable testing of future parser for puppet
In the near future, puppet will release version 4.0. Sites and devs
can evaluate their current puppet code by turning on features in
puppet to enable the future parser. This turns on the future parser
then runs the puppet parser validation rake task.

Change-Id: Iabb098560dc14327b96fa81564ec125d7c9b6c19
2015-02-09 07:04:56 -08:00

137 lines
3.2 KiB
YAML

- job-template:
name: 'gate-{name}-puppet-unit-{puppet_version}'
node: '{node}'
builders:
- uninstall-puppet
- revoke-sudo
- gerrit-git-prep
- shell: |
export PUPPET_GEM_VERSION='~> {puppet_version}.0'
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
bundle install
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'
node: '{node}'
builders:
- uninstall-puppet
- shell: |
sudo apt-get install -y libxml2-dev libxslt-dev
- gerrit-git-prep
- shell: |
echo "" | sudo tee -a /etc/ssh/sshd_config
echo "Match address 127.0.0.1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
echo "" | sudo tee -a /etc/ssh/sshd_config
echo "Match address ::1" | sudo tee -a /etc/ssh/sshd_config
echo " PermitRootLogin without-password" | sudo tee -a /etc/ssh/sshd_config
mkdir -p .ssh
ssh-keygen -f ~/.ssh/id_rsa -b 2048 -C "beaker key" -P ""
sudo mkdir -p /root/.ssh
cat ~/.ssh/id_rsa.pub | sudo tee -a /root/.ssh/authorized_keys
sudo service ssh restart
- revoke-sudo
- shell: |
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
bundle install
export BEAKER_set=nodepool
bundle exec rspec spec/acceptance
wrappers:
- build-timeout:
timeout: 60
- timestamps
publishers:
- console-log
- job-template:
name: '{name}-forge-upload'
node: pypi
builders:
- revoke-sudo
- gerrit-git-prep
- shell: |
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-future'
node: '{node}'
builders:
- uninstall-puppet
- revoke-sudo
- gerrit-git-prep
- shell: |
export PUPPET_GEM_VERSION='~> 3.7.0'
mkdir .bundled_gems
export GEM_HOME=`pwd`/.bundled_gems
bundle install
export FUTURE_PARSER=yes
bundle exec rake syntax
publishers:
- console-log
- job-group:
name: 'puppet-check-jobs'
jobs:
- 'gate-{name}-puppet-lint'
- 'gate-{name}-puppet-syntax'
- job-group:
name: 'puppet-module-unit'
puppet_version:
- 3.3
- 3.4
- 3.6
- 3.7
jobs:
- 'gate-{name}-puppet-unit-{puppet_version}'