Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/criteo/cookbook-release
https://github.com/criteo/cookbook-release
chef-cookbook semantic-versioning supermarket
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/criteo/cookbook-release
- Owner: criteo
- License: apache-2.0
- Created: 2015-09-18T09:21:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-18T10:45:09.000Z (11 months ago)
- Last Synced: 2024-10-31T13:15:10.386Z (about 2 months ago)
- Topics: chef-cookbook, semantic-versioning, supermarket
- Language: Ruby
- Size: 107 KB
- Stars: 1
- Watchers: 31
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
CookbookRelease
===============[![Build Status](https://travis-ci.org/criteo/cookbook-release.svg?branch=master)](https://travis-ci.org/criteo/cookbook-release)
[![Gem Version](https://badge.fury.io/rb/cookbook-release.svg)](https://badge.fury.io/rb/cookbook-release)Helper to release cookbooks. This motivation is to publish new version at each commit on master branch from the CI.
This helper will create tags, push them and publish to supermarket.
Daily use
---------cookbook-release reads commit messages since last release and suggest a new version accordingly.
The following table describes the word used to detect patch/minor/major version changes:
| Version change | Words |
|----------------|-------------------------------------------|
| Patch | _fix_, _bugfix_, _[Patch]_ |
| Major | _breaking_, _[Major]_ |
| Minor | Default case if none of the above matches |Those words are detected in the commit subject only (not in the fully message).
Examples of messages:
- [Breaking] Remove all migration code
- Fix migration code for old centos versionsOne-time setup (for cookbooks)
-----Include cookbook-release into your `Gemfile`.
Put `metadata.rb` inside the `chefignore` file (required if berkshelf >= 5.4.0).Require cookbook-release into the `metadata.rb` file and replace the version by the helper:
```
require 'cookbook-release'
version ::CookbookRelease::Release.current_version(__FILE__)
```Include the rake tasks in your Rakefile:
```
require 'cookbook-release'
CookbookRelease::Rake::CookbookTask.new
```Then you can publish on your supermarket using:
```
export SUPERMARKET_CLIENTKEYFILE=/tmp/my_key.pem
export SUPERMARKET_USERID=my_username
export SUPERMARKET_URL="http://supermarket.chef.io/api/v1/cookbooks"
export NO_PROMPT=""
export SUPERMARKET_NO_SSL_VERIFY=1
rake release!
```Optional environment variables:
```
export COOKBOOK_CATEGORY="Other" # defaults to Other
export SKIP_COOKOOK_UPLOAD=true #Just prepare release and push tag to git, but don't upload
```Note: this setup is intended to be used in a CI system such as jenkins or travis.
Changelog generation for chef-repositories
----Using:
```
require 'cookbook-release'
CookbookRelease::Rake::RepoTask.new
```will allow to create tasks to generate html changelog between HEAD and master branch. It aims to make some changes more visible such as [Risky] tag (or any tag used for major changes). You may add a `sub_dir` parameter to restrict the scope of the changes to a sub-directory of the git root.