Skip to content
This repository was archived by the owner on Jan 15, 2024. It is now read-only.

Commit 376d74f

Browse files
author
Lloyd Philbrook
authored
Merge pull request #19 from tablexi/updates
UPDATES
2 parents 5e53628 + 4943447 commit 376d74f

10 files changed

Lines changed: 651 additions & 5 deletions

File tree

.circleci/config.yml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
version: 2
2+
3+
defaults:
4+
env_setup: &env_setup
5+
docker:
6+
- image: ruby:2.5.0
7+
8+
bundle_cache_name: &bundle_cache_name
9+
bundler-cache-v2-{{ checksum "Gemfile.lock" }}
10+
11+
install_bundle: &install_bundle
12+
run:
13+
name: Bundle install
14+
command: bundle install --path ~/bundle
15+
16+
restore_bundle: &restore_bundle
17+
restore_cache:
18+
key: *bundle_cache_name
19+
20+
jobs:
21+
build:
22+
<<: *env_setup
23+
steps:
24+
- checkout
25+
- *restore_bundle
26+
- *install_bundle
27+
- save_cache:
28+
key: *bundle_cache_name
29+
paths:
30+
- ~/bundle
31+
32+
test:
33+
<<: *env_setup
34+
steps:
35+
- checkout
36+
- *restore_bundle
37+
- *install_bundle
38+
- run:
39+
name: Berks install
40+
command: bundle exec berks install
41+
- run:
42+
name: Test rubocop
43+
command: bundle exec rubocop
44+
- run:
45+
name: Test foodcritic
46+
command: bundle exec foodcritic .
47+
- run:
48+
name: Test rspec
49+
command: bundle exec rspec
50+
51+
version_and_changelog_update:
52+
<<: *env_setup
53+
steps:
54+
- checkout
55+
- *restore_bundle
56+
- *install_bundle
57+
- run:
58+
name: setup git for push
59+
command: |
60+
git push --set-upstream origin ${CIRCLE_BRANCH}
61+
git config --global user.email "ci@tablexi.com"
62+
git config --global user.name "CircleCI"
63+
- run:
64+
name: bump version
65+
command: bundle exec bump patch --tag --no-bundle
66+
- deploy:
67+
name: push version to github
68+
command: |
69+
git push origin --tags
70+
- run:
71+
name: update changelog
72+
command: bundle exec github_changelog_generator
73+
- deploy:
74+
name: push changelog to github
75+
command: |
76+
VERSION=`git describe --tags`
77+
git add CHANGELOG.md
78+
git commit --amend --no-edit
79+
git push origin :$VERSION
80+
git tag -f $VERSION
81+
git push origin --tags
82+
git push origin --force-with-lease
83+
84+
workflows:
85+
version: 2
86+
test_and_bump:
87+
jobs:
88+
- build:
89+
filters:
90+
tags:
91+
ignore:
92+
- /^v[0-9].*/
93+
- test:
94+
requires:
95+
- build
96+
filters:
97+
tags:
98+
ignore:
99+
- /^v[0-9].*/
100+
- hold:
101+
type: approval
102+
requires:
103+
- test
104+
filters:
105+
branches:
106+
only:
107+
- master
108+
tags:
109+
ignore:
110+
- /^v[0-9].*/
111+
- version_and_changelog_update:
112+
requires:
113+
- hold
114+
filters:
115+
branches:
116+
only:
117+
- master
118+
tags:
119+
ignore:
120+
- /^v[0-9].*/

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,4 @@ bin/*
1313
.bundle/*
1414

1515
# RVM
16-
.ruby-version
1716
.ruby-gemset

.rubocop.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
AllCops:
2+
Include:
3+
- Berksfile
4+
- Gemfile
5+
- Rakefile
6+
- Guardfile
7+
Exclude:
8+
- vendor/**/*
9+
- cookbooks/**/*
10+
11+
ClassLength:
12+
Enabled: false
13+
Documentation:
14+
Enabled: false
15+
Encoding:
16+
Enabled: false
17+
HashSyntax:
18+
Enabled: false
19+
LineLength:
20+
Enabled: false
21+
MethodLength:
22+
Enabled: false
23+
SignalException:
24+
Enabled: false
25+
WordArray:
26+
Enabled: false
27+
Style/FrozenStringLiteralComment:
28+
Enabled: false
29+
Metrics/BlockLength:
30+
Exclude:
31+
- spec/*.rb
32+
Layout/IndentHeredoc:
33+
Enabled: false

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.5.0

Gemfile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
source 'https://rubygems.org'
2+
3+
ruby File.open(File.expand_path('.ruby-version', File.dirname(__FILE__))) { |f| f.read.chomp }
4+
5+
gem 'berkshelf'
6+
gem 'chef', '~> 12'
7+
8+
group :ci do
9+
gem 'bump'
10+
gem 'github_changelog_generator'
11+
end
12+
13+
group :dev do
14+
gem 'chefspec'
15+
gem 'foodcritic'
16+
gem 'rubocop'
17+
gem 'stove'
18+
end
19+
20+
group :guard do
21+
gem 'guard'
22+
gem 'guard-foodcritic'
23+
gem 'guard-kitchen'
24+
gem 'guard-rspec'
25+
gem 'guard-rubocop'
26+
gem 'ruby_gntp'
27+
end
28+
29+
group :kitchen do
30+
gem 'chef-zero'
31+
gem 'kitchen-docker'
32+
gem 'kitchen-ec2'
33+
gem 'kitchen-transport-rsync'
34+
gem 'test-kitchen'
35+
end

0 commit comments

Comments
 (0)