require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'foodcritic'
+require 'stove/rake_task'
namespace :style do
desc 'Run Ruby style checks'
desc 'Run ChefSpec examples'
RSpec::Core::RakeTask.new(:spec)
+desc 'Publish cookbook'
+Stove::RakeTask.new(:publish) do |t|
+ t.stove_opts = [
+ '--no-git',
+ ]
+end
+
task default: ['style', 'spec']
--- /dev/null
+---
+# $ fly -t target sp -p docker-grid-cookbook -c concourse.yml -l fly-vars.yml -l ~/credentials.yml
+resources:
+- name: src-git
+ type: git
+ source:
+ uri: git://git.osdn.net/gitroot/metasearch/grid-chef-repo.git
+ branch: master
+- name: chefdk-cache
+ type: docker-image
+ source:
+ repository: chef/chefdk
+ tag: ((chefdk-version))
+ # ((param)) style: fly >= 3.2.0
+ registry_mirror: https://((registry-mirror-domain)) # e.g. https://registry.docker.example.com:5000
+ ca_certs:
+ - domain: ((registry-mirror-domain)) # e.g. registry.docker.example.com:5000
+ cert: ((docker-reg-ca-cert))
+
+jobs:
+- name: build-cookbook
+ plan:
+ - get: src-git
+ trigger: false
+ - get: chefdk-cache
+ - task: ci-build
+ image: chefdk-cache
+ config:
+ platform: linux
+
+ #image_resource:
+ # type: docker-image
+ # source:
+ # repository: chef/chefdk
+ # tag: ((chefdk-version))
+ # NG, setting disable
+ #registry_mirror: https://((registry-mirror-domain))
+ #ca_certs:
+ #- domain: ((registry-mirror-domain))
+ # cert: ((docker-reg-ca-cert))
+
+ inputs:
+ - name: src-git
+
+ run:
+ #dir: ./src-git/cookbooks/((cookbook-name))
+ #path: rake
+ path: /bin/bash
+ args:
+ - -c
+ - |
+ cd ./src-git/cookbooks/((cookbook-name))
+ bundle install
+ rake