Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Latest commit

 

History

History
84 lines (66 loc) · 2.95 KB

RELEASING.md

File metadata and controls

84 lines (66 loc) · 2.95 KB

Releasing opsworks_ruby

Checklist

  1. Ensure that you have mkdocs and mike installed locally: pip3 install --user mkdocs-material mike
  2. Make changes
  3. Commit those changes
  4. Make sure GitHub Actions turns green
  5. Make sure Coverage remains 100%
  6. Bump version in package.json
  7. Bump version in metadata.rb
  8. Add contributors to README.md and docs/team.md if necessary
  9. echo -n "<your chef login>" > .chef.login
  10. Put your chef private key associated with opsworks_ruby cookbook as client.pem file into project directory
  11. docker-compose run --rm cookbook bundle update
  12. docker-compose build
  13. Run Unit Testing and Linting
  14. docker-compose run --rm cookbook conventional-changelog -s -p angular -i CHANGELOG.md
  15. Properly copy paste new entries in CHANGELOG.md to docs/changelog.md
  16. Commit all the things with chore: Version bump
  17. Add new configuration options to gh-pages-source if necessary
  18. Tag version
  19. Push: git push origin master --tags
  20. Deploy new documentation version mike deploy --push --prefix docs --update-aliases $(git tag -l | sort -Vr | head -n 1) latest
  21. docker-compose run --rm cookbook knife cookbook site share opsworks_ruby Applications
  22. Draft new release on GitHub

Solving problems with knife

In case of trouble, check Sharing Chef Cookbooks article. Short version:

WARNING: No knife configuration file found

$ knife cookbook site share opsworks_ruby Applications
WARNING: No knife configuration file found
ERROR: Chef::Exceptions::CookbookNotFoundInRepo: Cannot find a cookbook named opsworks_ruby;
did you forget to add metadata to a cookbook? (http://wiki.opscode.com/display/chef/Metadata)

Solution:

% echo client_key \"#{ENV['HOME']}/.chef/client.pem\" >> ~/.chef/knife.rb
% echo cookbook_path \"#{ENV['HOME']}/Projects/cookbooks\" >> ~/.chef/knife.rb

ERROR: Errno::EACCES: Permission denied - /var/chef

% knife cookbook site share opsworks_ruby Applications
ERROR: Errno::EACCES: Permission denied - /var/chef

Solution:

% sudo chown -R $USER /var/chef

ERROR: Authentication failed due to an invalid public/private key pair

docker run -it --rm --privileged --pid=host opsworksruby_cookbook \
       nsenter -t 1 -m -u -n -i date -u $(date -u +%m%d%H%M%Y)

ERROR: Error uploading cookbook opsworks_ruby to the Opscode Cookbook Site

% knife cookbook site share opsworks_ruby Applications
Generating metadata for opsworks_ruby from /tmp/chef-opsworks_ruby-build20161021-18021-ypq6jp/opsworks_ruby/metadata.rb
Making tarball opsworks_ruby.tgz
ERROR: Error uploading cookbook opsworks_ruby to the Opscode Cookbook Site:
undefined method `strip' for nil:NilClass.
Set log level to debug (-l debug) for more information.`

Solution:

% echo node_name \"<your chef login>\" >> ~/.chef/knife.rb