---
-# $ fly -t target sp -p 00cookbook-cookbook -c concourse.yml -l fly-vars.yml -l ~/credentials.yml
+# $ fly -t target sp -p 00cookbook-cookbook -c concourse.yml -l fly-vars.yml -l ~/sec/credentials-prod.yml
+resource_types:
+- name: ya-git
+ type: docker-image
+ source:
+ repository: whitestar/git-resource
+ registry_mirror: https://((registry-mirror-domain))
+ ca_certs:
+ - domain: ((registry-mirror-domain))
+ cert: ((docker-reg-ca-cert))
+
resources:
- name: src-git
- type: git
+ type: ya-git
+ #type: git
source:
- uri: git://git.osdn.net/gitroot/metasearch/grid-chef-repo.git
+ uri: ((git-id-osdn))@git.osdn.net:/gitroot/metasearch/grid-chef-repo.git
branch: master
paths:
- cookbooks/((cookbook-name))
+ private_key: ((git-private-key))
+ git_user: ((git-user-osdn))
#check_every: 1h # default: 1m
- name: chefdk-cache
type: docker-image
check_every: 12h # default: 1m
jobs:
-- name: build-cookbook
+- name: test-cookbook
plan:
- aggregate:
- get: src-git
#HTTP_PROXY: ((http-proxy))
config:
platform: linux
-
#image_resource:
# type: docker-image
# source:
#ca_certs:
#- domain: ((registry-mirror-domain))
# cert: ((docker-reg-ca-cert))
-
inputs:
- name: src-git
-
run:
#dir: ./src-git/cookbooks/((cookbook-name))
#path: rake
args:
- -c
- |
- hostname -i
cd ./src-git/cookbooks/((cookbook-name))
bundle install
rake
+- name: publish-cookbook
+ plan:
+ - aggregate:
+ - get: src-git
+ params:
+ depth: 5
+ trigger: false
+ - get: chefdk-cache
+ - task: publish
+ image: chefdk-cache
+ params:
+ http_proxy: ((http-proxy))
+ chef_username: ((chef-username))
+ chef_client_key: ((chef-client-key))
+ config:
+ platform: linux
+ inputs:
+ - name: src-git
+ run:
+ path: /bin/bash
+ args:
+ - -c
+ - |
+ echo '{"username":"((chef-username))","key":"/root/chef-client-key.pem"}' > /root/.stove
+ echo "$chef_client_key" > /root/chef-client-key.pem
+ cd ./src-git/cookbooks/((cookbook-name))
+ bundle install
+ rake publish
+ - put: src-git
+ params:
+ repository: src-git
+ tag_prefix: ((cookbook-name))-
+ tag: src-git/cookbooks/((cookbook-name))/version
+ only_tag: true
+ annotate: src-git/cookbooks/((cookbook-name))/version
+ #annotate: # path to a file containing the annotation message.
license 'Apache 2.0'
description 'Installs/Configures 00cookbook'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.1.0'
+version IO.read(File.join(File.dirname(__FILE__), 'version')).chomp
source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
issues_url 'https://osdn.jp/projects/metasearch/ticket'
-chef_version '>= 12'
+chef_version '>= 12'
%w( centos redhat ).each do |os|
supports os, '>= 7.0'
end