project-config/jenkins/jobs/chef-jobs.yaml
Jan Klare cf106850a1 run periodic-{name}-chef-rake-integration for master branch
* periodic-{name}-chef-rake-integration is currently broken, since $BRANCH gets
  not defined in periodic jobs by default but needed got gerrit-git-prep
* switch from gerrit-git-prep to  branch-git-prep with branch: master for
  periodic-{name}-chef-rake-integration to explicitly set the $BRANCH to clone
  to master

Change-Id: I54501cca8979669112bff5199c3c114cbaa3a6ad
2015-10-30 07:37:45 +09:00

146 lines
3.0 KiB
YAML

- job-template:
name: 'gate-{name}-chef-unit'
node: '{node}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- gerrit-git-prep
- ruby-191-prep
- chef-bundler-prep
- revoke-sudo
- chef-berkshelf-prep
- chef-cookbook-chefspec
publishers:
- console-log
# this job template requires a bootstrap.sh script (which installs chefdk and other dependencies)
# and a Rakefile with the tests that should be executed in the cookbook
- job-template:
name: 'gate-{name}-chef-rake'
node: '{node}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- gerrit-git-prep
- chef-bootstrap
- revoke-sudo
- chef-rake-test
publishers:
- console-log
# this job template requires a bootstrap.sh script (which installs chefdk and other dependencies)
# and a Rakefile with the integration tests that should be executed
# sudo privileges for jenkins are not revoked, since they are needed during the chef run executed for integration testing
- job-template:
name: 'gate-{name}-chef-rake-integration'
node: '{node}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- gerrit-git-prep
- chef-bootstrap
- chef-rake-integration
publishers:
- console-log
- job-template:
name: 'periodic-{name}-chef-rake-integration'
node: '{node}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- branch-git-prep:
branch: master
- chef-bootstrap
- chef-rake-integration
publishers:
- console-log
- job-template:
name: 'gate-{name}-chef-lint'
node: '{node}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- gerrit-git-prep
- ruby-191-prep
- chef-bundler-prep
- revoke-sudo
- chef-berkshelf-prep
- chef-cookbook-foodcritic
publishers:
- console-log
- job-template:
name: 'gate-{name}-chef-style'
node: '{node}'
wrappers:
- build-timeout:
timeout: 60
- timestamps
builders:
- gerrit-git-prep
- ruby-191-prep
- chef-bundler-prep
- revoke-sudo
- chef-berkshelf-prep
- chef-cookbook-rubocop
publishers:
- console-log
- job:
name: gate-openstack-chef-repo
node: 'bare-precise || bare-trusty'
builders:
- gerrit-git-prep
- ruby-191-prep
- chef-bundler-prep
- revoke-sudo
- chef-berkshelf-prep
- shell: |
#!/bin/bash -xe
# Validates roles
bundle exec spiceweasel infrastructure.yml --debug
publishers:
- console-log
- job-group:
name: chef-test-jobs
jobs:
- 'gate-{name}-chef-lint'
- 'gate-{name}-chef-style'
- 'gate-{name}-chef-unit'
- 'gate-{name}-chef-rake'
- 'gate-{name}-chef-rake-integration'
- 'periodic-{name}-chef-rake-integration'