Skip to content

Instantly share code, notes, and snippets.

@afiune
Last active March 18, 2016 20:41
Show Gist options
  • Select an option

  • Save afiune/87f457b3872df0d9481f to your computer and use it in GitHub Desktop.

Select an option

Save afiune/87f457b3872df0d9481f to your computer and use it in GitHub Desktop.

Delivery-cli Feature: Automatic version bump

Today we released the delivery-cli version 20160317163950 that includes a new feature to allow customers to automatically bump the version of the metadata of the cookbooks that are submitted to review in Delivery.

There are two methods to use this functionality:

Passing -a, --auto-bump flags

You can pass the flag -a or --auto-bump to the delivery review command:

➜  coffee git:(black) delivery review --auto-bump
Chef Delivery
Loading configuration from /Users/salimafiune/delivery/organizations/sandbox/coffee
Project coffee is a cookbook
Validating version in metadata
The version hasn't been updated (0.1.0)
Bumping version to: 0.1.1
Review for change black targeted for pipeline master
Created new patchset
https://delivery.chef.co/e/chef/#/organizations/sandbox/projects/coffee/changes/b6f33043-53e2-48c0-a92d-dbcc4964082c
➜  coffee git:(black)

This will activate this functionality just for this particular review.

Permanently enable in the cli.toml file

By default this feature is disabled but you can activate it for every review that you submit to Delivery by adding the auto_bump parameter to your .delivery/cli.toml configuration file:

auto_bump = true

With this whenever you run delivery review on any project it will verify the version automatically. (without extra flags)

➜  starwars git:(darth-vader) delivery review
Chef Delivery
Loading configuration from /Users/salimafiune/delivery/organizations/sandbox/starwars
Project starwars is a cookbook
Validating version in metadata
The version hasn't been updated (0.1.5)
Bumping version to: 0.1.6
Review for change darth-vader targeted for pipeline master
Created new patchset
https://delivery.chef.co/e/chef/#/organizations/sandbox/projects/starwars/changes/e9ccef7f-1174-49f8-8a3c-ef2eba9be45e
➜  starwars git:(darth-vader)

The delivery-cli will not bump the major/minor version. Just the patchset. If there is a need to decide wether of not the change is a major or minor version bump we would like to let the developer to bump it manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment