• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: コミット

Grid環境構築用のChefリポジトリです。


コミットメタ情報

リビジョン48605f05b33c6cfccbc427930e2aea4c437597ee (tree)
日時2018-09-11 22:17:52
作者whitestar <whitestar@user...>
コミッターwhitestar

ログメッセージ

updates template cookbook.

変更サマリ

差分

--- a/cookbooks/00cookbook/Rakefile
+++ b/cookbooks/00cookbook/Rakefile
@@ -3,8 +3,13 @@ require 'rubocop/rake_task'
33 require 'foodcritic'
44 require 'stove/rake_task'
55
6+tpl_cookbook = '00cookbook'
7+cookbook_name = File.basename(Dir.pwd)
8+
69 desc 'Initialize project'
710 task :init do
11+ next if cookbook_name == tpl_cookbook
12+
813 [
914 '.foodcritic',
1015 '.rubocop.yml',
@@ -12,16 +17,31 @@ task :init do
1217 'concourse.yml',
1318 'fly-vars.yml',
1419 'Gemfile',
20+ 'Gemfile.lock',
1521 'version',
1622 ].each {|conf|
17- sh "cp ../00cookbook/#{conf} ./" unless File.exist?(conf)
23+ sh "cp ../#{tpl_cookbook}/#{conf} ./" unless File.exist?(conf)
24+ }
25+end
26+
27+desc 'Update project'
28+task :update do
29+ next if cookbook_name == tpl_cookbook
30+
31+ [
32+ 'Rakefile',
33+ 'concourse.yml',
34+ 'Gemfile',
35+ 'Gemfile.lock',
36+ ].each {|conf|
37+ sh "cp ../#{tpl_cookbook}/#{conf} ./"
1838 }
1939 end
2040
2141 desc 'fly set-pipeline'
2242 task :'set-pipeline' do
2343 sh [
24- "fly -t $CC_TARGET sp -p #{File.basename(Dir.pwd)}-cookbook -c concourse.yml",
44+ "fly -t $CC_TARGET sp -p #{cookbook_name}-cookbook -c concourse.yml",
2545 '-l fly-vars.yml -l ~/sec/credentials-prod.yml',
2646 ].join(' ')
2747 end
--- a/cookbooks/00cookbook/concourse.yml
+++ b/cookbooks/00cookbook/concourse.yml
@@ -1,5 +1,4 @@
11 ---
2-# $ fly -t $CC_TARGET sp -p 00cookbook-cookbook -c concourse.yml -l fly-vars.yml -l ~/sec/credentials-prod.yml
32 resources:
43 - name: src-git
54 type: git
--- a/cookbooks/00cookbook/fly-vars.yml
+++ b/cookbooks/00cookbook/fly-vars.yml
@@ -1,3 +1,3 @@
11 ---
22 cookbook-name: 00cookbook
3-chefdk-version: 1.4.3
3+chefdk-version: 1.6.11
旧リポジトリブラウザで表示