Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding latest chef-sugar code #98

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions cookbooks/chef-sugar/.expeditor/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Documentation available at https://expeditor.chef.io/docs/getting-started/
---

# Slack channel in Chef Software slack to send notifications about build failures, etc
slack:
notify_channel: chef-infra-notify

# This publish is triggered by the `built_in:publish_rubygems` artifact_action.
rubygems:
- chef-sugar
- chef-sugar-ng

github:
# This deletes the GitHub PR branch after successfully merged into the release branch
delete_branch_on_merge: true
# The tag format to use (e.g. v1.0.0)
version_tag_format: "v{{version}}"
# allow bumping the minor release via label
minor_bump_labels:
- "Expeditor: Bump Version Minor"
# allow bumping the major release via label
major_bump_labels:
- "Expeditor: Bump Version Major"

changelog:
rollup_header: Changes not yet released to rubygems.org

# These actions are taken, in order they are specified, anytime a Pull Request is merged.
merge_actions:
- built_in:bump_version:
ignore_labels:
- "Expeditor: Skip Version Bump"
- "Expeditor: Skip All"
- bash:.expeditor/update_version.sh:
only_if: built_in:bump_version
- built_in:update_changelog:
ignore_labels:
- "Expeditor: Skip Changelog"
- "Expeditor: Skip All"
- built_in:build_gem:
only_if: built_in:bump_version

pipelines:
- verify:
description: Pull Request validation tests
public: true

promote:
actions:
- built_in:rollover_changelog
- built_in:publish_rubygems
16 changes: 16 additions & 0 deletions cookbooks/chef-sugar/.expeditor/run_linux_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
#
# This script runs a passed in command, but first setups up the bundler caching on the repo

set -ue

export USER="root"
export LANG=C.UTF-8 LANGUAGE=C.UTF-8

echo "--- bundle install"

bundle config --local path vendor/bundle
bundle install --jobs=7 --retry=3 --without docs debug kitchen

echo "+++ bundle exec task"
bundle exec $@
12 changes: 12 additions & 0 deletions cookbooks/chef-sugar/.expeditor/update_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
#
# After a PR merge, Chef Expeditor will bump the PATCH version in the VERSION file.
# It then executes this file to update any other files/components with that new version.
#

set -evx

sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/chef/sugar/version.rb
sed -i -r "s/^version '.*'/version '$(cat VERSION)'/" metadata.rb
# Once Expeditor finshes executing this script, it will commit the changes and push
# the commit as a new tag corresponding to the value in the VERSION file.
62 changes: 62 additions & 0 deletions cookbooks/chef-sugar/.expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
expeditor:
cached_folders:
- vendor
defaults:
buildkite:
retry:
automatic:
limit: 1
timeout_in_minutes: 30

steps:

- label: run-specs-ruby-2.3
command:
- .expeditor/run_linux_tests.sh "rake"
expeditor:
executor:
docker:
image: ruby:2.3

- label: run-specs-ruby-2.4
command:
- .expeditor/run_linux_tests.sh "rake"
expeditor:
executor:
docker:
image: ruby:2.4-buster

- label: run-specs-ruby-2.5
command:
- .expeditor/run_linux_tests.sh "rake"
expeditor:
executor:
docker:
image: ruby:2.5-buster

- label: run-specs-ruby-2.6
command:
- .expeditor/run_linux_tests.sh "rake"
expeditor:
executor:
docker:
image: ruby:2.6-buster

- label: run-specs-ruby-2.7
command:
- .expeditor/run_linux_tests.sh "rake"
expeditor:
executor:
docker:
image: ruby:2.7-buster

- label: run-specs-windows
command:
- bundle config --local path vendor/bundle
- bundle install --jobs=7 --retry=3 --without=debug
- bundle exec rake spec
expeditor:
executor:
docker:
host_os: windows
5 changes: 5 additions & 0 deletions cookbooks/chef-sugar/.github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Order is important. The last matching pattern has the most precedence.

* @chef/chef-infra-reviewers @chef/chef-infra-approvers @chef/chef-infra-owners
.expeditor/ @chef/jex-team
*.md @chef/docs-team
43 changes: 43 additions & 0 deletions cookbooks/chef-sugar/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: 🐛 Bug Report
about: If something isn't working as expected 🤔.
labels: "Status: Untriaged"
---

<!---
!!!!!! NOTE: CHEF CLIENT BUGS ONLY !!!!!!

This issue tracker is for the code contained within this repo -- `chef-client`, base `knife` functionality (not
plugins), `chef-apply`, `chef-solo`, `chef-client -z`, etc.

* Requests for new or alternative functionality should be made to [feedback.chef.io](https://feedback.chef.io/forums/301644-chef-product-feedback/category/110832-chef-client)
* [Chef Server issues](https://github.com/chef/chef-server/issues/new)
* [ChefDK issues](https://github.com/chef/chef-dk/issues/new)
* Cookbook Issues (see the https://github.com/chef-cookbooks repos or search [Supermarket](https://supermarket.chef.io) or GitHub/Google)

-->

## Description
<!--- Briefly describe the issue -->

## Chef Version
<!--- Tell us which version of chef-client you are using (see below for Server+ChefDK bugs). -->

## Platform Version
<!--- Tell us which operating system distribution and version chef-client is running on. -->

## Replication Case
<!--- Tell us what steps to take to replicate your problem. See [How to create a Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve)
for information on how to create a good replication case. -->

## Client Output
<!--- The relevant output of the chef-client run or a link to a gist of the entire run, if there is one.

The debug output (chef-client -l debug) may be useful, but please link to a gist, or truncate it. -->

```

```

## Stacktrace
<!--- Please include the stacktrace.out output or link to a gist of it, if there is one. -->
40 changes: 40 additions & 0 deletions cookbooks/chef-sugar/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Design Proposal
about: I have a significant change I would like to propose and discuss before starting
labels: "Status: Untriaged"
---

### When a Change Needs a Design Proposal

A design proposal should be opened any time a change meets one of the following qualifications:

- Significantly changes the user experience of a project in a way that impacts users.
- Significantly changes the underlying architecture of the project in a way that impacts other developers.
- Changes the development or testing process of the project such as a change of CI systems or test frameworks.

### Why We Use This Process

- Allows all interested parties (including any community member) to discuss large impact changes to a project.
- Serves as a durable paper trail for discussions regarding project architecture.
- Forces design discussions to occur before PRs are created.
- Reduces PR refactoring and rejected PRs.

---

<!--- Proposal description and rationale. -->

## Motivation

<!---
As a <<user_profile>>,
I want to <<functionality>>,
so that <<benefit>>.
-->

## Specification

<!--- A detailed description of the planned implementation. -->

## Downstream Impact

<!--- Which other tools will be impacted by this work? -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: 🚀 Enhancement Request
about: I have a suggestion (and may want to implement it 🙂)!
labels: "Status: Untriaged"
---

### Describe the Enhancement:
<!--- What you are trying to achieve that you can't? -->

### Describe the Need:
<!--- What kind of user do you believe would utilize this enhancement, and how many users might want this functionality -->

### Current Alternative
<!--- Is there a current alternative that you can utilize to workaround the lack of this enhancement -->

### Can We Help You Implement This?:
<!--- The best way to ensure your enhancement is built is to help implement the enhancement yourself. If you're interested in helping out we'd love to give you a hand to make this possible. Let us know if there's something you need. -->
12 changes: 12 additions & 0 deletions cookbooks/chef-sugar/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: 🤗 Support Question
about: If you have a question 💬, please check out our Slack!
---

We use GitHub issues to track bugs and feature requests. If you need help please post to our Mailing List or join the Chef Community Slack.

* Chef Community Slack at http://community-slack.chef.io/.
* Chef Mailing List https://discourse.chef.io/


Support issues opened here will be closed and redirected to Slack or Discourse.
3 changes: 3 additions & 0 deletions cookbooks/chef-sugar/.github/lock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
daysUntilLock: 90
lockLabel: false
lockComment: false
2 changes: 1 addition & 1 deletion cookbooks/chef-sugar/.kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ provisioner:
platforms:
- name: centos-6
- name: centos-7
- name: ubuntu-14.04
- name: ubuntu-16.04
- name: ubuntu-18.04

suites:
- name: default
Expand Down
17 changes: 0 additions & 17 deletions cookbooks/chef-sugar/.travis.yml

This file was deleted.

40 changes: 39 additions & 1 deletion cookbooks/chef-sugar/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@

This file is used to list changes made in each version of the chef-sugar cookbook and gem.

<!-- latest_release -->
<!-- latest_release -->

<!-- release_rollup -->
<!-- release_rollup -->

<!-- latest_stable_release -->
## [v5.1.12](https://github.com/chef/chef-sugar/tree/v5.1.12) (2020-11-11)

#### Merged Pull Requests
- Don&#39;t define which helper on Chef 16+ to avoid conflicts [#21](https://github.com/chef/chef-sugar/pull/21) ([tas50](https://github.com/tas50))
<!-- latest_stable_release -->

## [v5.1.11](https://github.com/chef/chef-sugar/tree/v5.1.11) (2020-08-14)

#### Merged Pull Requests
- Fix Ruby 2.3 tests [#19](https://github.com/chef/chef-sugar/pull/19) ([tas50](https://github.com/tas50))
- Only require libs if we haven&#39;t already loaded them [#20](https://github.com/chef/chef-sugar/pull/20) ([tas50](https://github.com/tas50))

## [v5.1.9](https://github.com/chef/chef-sugar/tree/v5.1.9) (2019-11-13)

#### Merged Pull Requests
- Don&#39;t fail if Chef::VERSION isn&#39;t defined [#18](https://github.com/chef/chef-sugar/pull/18) ([lamont-granquist](https://github.com/lamont-granquist))

## [v5.1.8](https://github.com/chef/chef-sugar/tree/v5.1.8) (2019-11-13)

#### Merged Pull Requests
- Wire up Expeditor and support both chef-sugar and chef-sugar-ng [#8](https://github.com/chef/chef-sugar/pull/8) ([tas50](https://github.com/tas50))
- Add github templates and a code of conduct [#9](https://github.com/chef/chef-sugar/pull/9) ([tas50](https://github.com/tas50))
- Beginning of chef-sugar deprecation [#10](https://github.com/chef/chef-sugar/pull/10) ([lamont-granquist](https://github.com/lamont-granquist))
- Use Expeditor to set the version in the metadata.rb file [#11](https://github.com/chef/chef-sugar/pull/11) ([tas50](https://github.com/tas50))
- Switch gemfile back to chef-sugar [#12](https://github.com/chef/chef-sugar/pull/12) ([tas50](https://github.com/tas50))
- Fix metadata.rb version updatig logic and use SPDX compliant license strings [#14](https://github.com/chef/chef-sugar/pull/14) ([tas50](https://github.com/tas50))
- Additional Chef-15 greenification [#13](https://github.com/chef/chef-sugar/pull/13) ([lamont-granquist](https://github.com/lamont-granquist))
- Move test deps to the Gemfile [#15](https://github.com/chef/chef-sugar/pull/15) ([tas50](https://github.com/tas50))
- Get the tests green [#17](https://github.com/chef/chef-sugar/pull/17) ([tas50](https://github.com/tas50))
- Deprecate chef-sugar node API [#16](https://github.com/chef/chef-sugar/pull/16) ([lamont-granquist](https://github.com/lamont-granquist))

## v5.0.1 (2019-03-13)

- Modifies the behavior of `systemd?` so that it works equally well on physical/virtual
Expand Down Expand Up @@ -268,4 +306,4 @@ machines as well as within containers.

## v1.0.0 (2013-10-15)

- First public release
- First public release
1 change: 1 addition & 0 deletions cookbooks/chef-sugar/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Please refer to the Chef Community Code of Conduct at https://www.chef.io/code-of-conduct/
Loading