This repository has been archived by the owner on Feb 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from tablexi/develop
Release v1.0.1
- Loading branch information
Showing
25 changed files
with
1,043 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
version: 2 | ||
|
||
defaults: | ||
env_setup: &env_setup | ||
working_directory: ~/chef-bashrc_manager | ||
docker: | ||
- image: circleci/ruby:2.4.1 | ||
|
||
bundle_cache_name: &bundle_cache_name | ||
bundler-cache-v1-{{ checksum "Gemfile.lock" }} | ||
|
||
install_bundle: &install_bundle | ||
run: | ||
name: Bundle install | ||
command: bundle install --path vendor/bundle | ||
|
||
restore_bundle: &restore_bundle | ||
restore_cache: | ||
key: *bundle_cache_name | ||
|
||
jobs: | ||
build: | ||
<<: *env_setup | ||
steps: | ||
- checkout | ||
- *restore_bundle | ||
- *install_bundle | ||
- save_cache: | ||
key: *bundle_cache_name | ||
paths: | ||
- ./vendor/bundle | ||
|
||
test: | ||
<<: *env_setup | ||
steps: | ||
- checkout | ||
- *restore_bundle | ||
- *install_bundle | ||
- run: | ||
name: Berks install | ||
command: bundle exec berks install | ||
- run: | ||
name: Test rubocop | ||
command: bundle exec rubocop | ||
- run: | ||
name: Test foodcritic | ||
command: bundle exec foodcritic . | ||
- run: | ||
name: Test rspec | ||
command: bundle exec rspec | ||
|
||
version_and_changelog_update: | ||
<<: *env_setup | ||
steps: | ||
- checkout | ||
- *restore_bundle | ||
- *install_bundle | ||
- run: | ||
name: setup git for push | ||
command: | | ||
git push --set-upstream origin ${CIRCLE_BRANCH} | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CircleCI" | ||
- run: | ||
name: bump version | ||
command: bundle exec bump patch --tag --no-bundle | ||
- deploy: | ||
name: push version to github | ||
command: | | ||
git push origin --tags | ||
- run: | ||
name: update changelog | ||
command: bundle exec github_changelog_generator | ||
- deploy: | ||
name: push changelog to github | ||
command: | | ||
VERSION=`git describe --tags` | ||
git add CHANGELOG.md | ||
git commit --amend --no-edit | ||
git push origin :$VERSION | ||
git tag -f $VERSION | ||
git push origin --tags | ||
git push origin --force-with-lease | ||
workflows: | ||
version: 2 | ||
test_and_bump: | ||
jobs: | ||
- build: | ||
filters: | ||
tags: | ||
ignore: | ||
- /^v[0-9].*/ | ||
- test: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
ignore: | ||
- /^v[0-9].*/ | ||
- hold: | ||
type: approval | ||
requires: | ||
- test | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
tags: | ||
ignore: | ||
- /^v[0-9].*/ | ||
- version_and_changelog_update: | ||
requires: | ||
- hold | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
tags: | ||
ignore: | ||
- /^v[0-9].*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,12 @@ Berksfile.lock | |
/cookbooks | ||
|
||
# Bundler | ||
Gemfile.lock | ||
bin/* | ||
.bundle/* | ||
|
||
# RVM | ||
.rvmrc | ||
.ruby-* | ||
|
||
# Test Kitchen | ||
.kitchen/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
driver: | ||
name: docker | ||
privileged: true | ||
use_sudo: false | ||
|
||
provisioner: | ||
require_chef_omnibus: 12 | ||
name: chef_zero | ||
|
||
platforms: | ||
- name: amazonlinux | ||
driver_config: | ||
image: amazonlinux | ||
platform: rhel | ||
- name: centos-6 | ||
- name: centos-7 | ||
- name: debian-7 | ||
- name: debian-8 | ||
- name: debian-9 | ||
- name: ubuntu-14.04 | ||
- name: ubuntu-16.04 | ||
|
||
suites: | ||
- name: default | ||
run_list: | ||
- recipe[test::default] | ||
- recipe[test::bashrc_manager] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
AllCops: | ||
Include: | ||
- Berksfile | ||
- Gemfile | ||
- Rakefile | ||
- Guardfile | ||
Exclude: | ||
- vendor/**/* | ||
- cookbooks/**/* | ||
|
||
ClassLength: | ||
Enabled: false | ||
Documentation: | ||
Enabled: false | ||
Encoding: | ||
Enabled: false | ||
HashSyntax: | ||
Enabled: false | ||
LineLength: | ||
Enabled: false | ||
MethodLength: | ||
Enabled: false | ||
SignalException: | ||
Enabled: false | ||
WordArray: | ||
Enabled: false | ||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
Metrics/BlockLength: | ||
Exclude: | ||
- spec/*.rb | ||
Layout/IndentHeredoc: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
script: | ||
- bundle exec foodcritic -f any . | ||
- bundle exec rspec --color --format progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source 'https://supermarket.getchef.com' | ||
|
||
metadata | ||
|
||
group :unit do | ||
cookbook 'test', path: 'spec/support/cookbooks/test' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
source 'http://rubygems.org' | ||
|
||
ruby '2.4.1' | ||
|
||
gem 'berkshelf' | ||
gem 'chef', '~> 12' | ||
|
||
group :ci do | ||
gem 'bump' | ||
gem 'github_changelog_generator' | ||
end | ||
|
||
group :dev do | ||
gem 'chefspec' | ||
gem 'foodcritic' | ||
gem 'rubocop' | ||
gem 'stove' | ||
end | ||
|
||
group :guard do | ||
gem 'guard' | ||
gem 'guard-foodcritic' | ||
gem 'guard-kitchen' | ||
gem 'guard-rspec' | ||
gem 'guard-rubocop' | ||
gem 'ruby_gntp' | ||
end | ||
|
||
group :kitchen do | ||
gem 'chef-zero' | ||
gem 'kitchen-docker' | ||
gem 'kitchen-ec2' | ||
gem 'kitchen-transport-rsync' | ||
gem 'test-kitchen' | ||
end |
Oops, something went wrong.