Skip to content

Commit

Permalink
Merge branch 'main' into unified-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
damacus authored Feb 13, 2023
2 parents 0b0b91f + fafefd9 commit 8f7667d
Show file tree
Hide file tree
Showing 19 changed files with 133 additions and 110 deletions.
10 changes: 0 additions & 10 deletions .circleci/config.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .delivery/project.toml

This file was deleted.

48 changes: 17 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,37 @@ name: ci
branches: [master]

jobs:
delivery:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run Chef Delivery
uses: actionshub/chef-delivery@main
env:
CHEF_LICENSE: accept-no-persist

yamllint:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run yaml Lint
uses: actionshub/yamllint@main

mdl:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Run Markdown Lint
uses: actionshub/markdownlint@main
lint-unit:
uses: sous-chefs/.github/.github/workflows/[email protected]
permissions:
actions: write
checks: write
pull-requests: write
statuses: write
issues: write

integration:
needs: [mdl, yamllint, delivery]
needs: lint-unit
runs-on: ubuntu-latest
strategy:
matrix:
os:
- 'almalinux-8'
- 'centos-7'
- 'centos-8'
- 'debian-9'
- 'centos-stream-8'
- 'debian-10'
- 'debian-11'
- 'rockylinux-8'
- 'ubuntu-1804'
- 'ubuntu-2004'
- 'ubuntu-2204'
suite:
- 'default'
fail-fast: false

steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Chef
uses: actionshub/chef-install@main
- name: Dokken
Expand All @@ -64,11 +50,11 @@ jobs:
os: ${{ matrix.os }}

integration-macos:
needs: [mdl, yamllint, delivery]
needs: lint-unit
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Chef
uses: actionshub/chef-install@main
- name: Kitchen Test
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/md-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: markdown-link-check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
- uses: actions/stale@v7
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
close-issue-message: >
Expand Down
4 changes: 0 additions & 4 deletions .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ PreCommit:
enabled: true
required_executable: 'cookstyle'
command: ["cookstyle"]
Delivery:
enabled: true
required_executable: 'delivery'
flags: ['local', 'all']
CommitMsg:
HardTabs:
enabled: true
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Require unified_mode is always enabled for Chef 17 support
- Remove the homebrew resource

## 2.3.4 - *2023-02-13*

## 2.3.3 - *2023-02-13*

## 2.3.2 - *2023-02-13*

## 2.3.1 - *2022-12-06*

Standardise files with files in sous-chefs/repo-management

## 2.3.0 - *2022-08-08*

- Add `verbose` option
- Remove Delivery and move to calling RSpec directly via a reusable workflow
- Use reusable workflows
- Update test build to use Ruby 3.0.4
- Add Alma Linux & Rocky Linux / Replace CentOS 8 with CentOS Stream 8
- Standardize kitchen.dokken.yml
- Add support for Ubuntu 22.04
- Remove use of yum-centos and replace with use of yum-config-manager to make it easier to work with Alma/Rocky
- Install [email protected] on MacOS

## 2.2.3 - *2022-05-16*

- Standardise files with files in sous-chefs/repo-management

## 2.2.2 - *2022-02-10*

- Standardise files with files in sous-chefs/repo-management

## 2.2.1 - *2022-02-08*

- Remove delivery folder

## 2.2.0 - *2021-12-27*

- support Chef temporary directory being located on a volume mounted `noexec`
Expand Down
2 changes: 1 addition & 1 deletion chefignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Dangerfile
examples/*
features/*
Guardfile
kitchen.yml*
kitchen*.yml
mlc_config.json
Procfile
Rakefile
Expand Down
5 changes: 3 additions & 2 deletions documentation/resources/definition.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ Install a Ruby Definition (Ruby version)
| Property | Ruby Type | Default | Description |
| ------------- | --------- | ----------------- | ----------------------------------------------------- |
| `definition` | String | | Version of Ruby to install |
| `prefix_path` | String | `/usr/local/ruby` | Location to install Ruby |
| `environment` | String | | Environment to pass to the ruby-build install process |
| `user` | String | | User to install as |
| `group` | String | | Group to install as |
| `prefix_path` | String | `/usr/local/ruby` | Location to install Ruby |
| `user` | String | | User to install as |
| `verbose` | Boolean | `false` | Print compilation status to stdout |

## Example Usage

Expand Down
44 changes: 22 additions & 22 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,60 @@
driver:
name: dokken
privileged: true
chef_version: <%= ENV['CHEF_VERSION'] || 'current' %>
chef_license: accept-no-persist

transport:
name: dokken

provisioner:
name: dokken
deprecations_as_errors: true

verifier:
name: inspec

platforms:
- name: debian-9
- name: almalinux-8
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install sudo -y
image: dokken/almalinux-8
pid_one_command: /usr/lib/systemd/systemd

- name: debian-10
driver:
image: dokken/debian-10
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install sudo -y

- name: debian-11
driver:
image: dokken/debian-11
pid_one_command: /bin/systemd

- name: centos-7
driver:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN yum -y install sudo

- name: centos-8
- name: centos-stream-8
driver:
image: dokken/centos-8
image: dokken/centos-stream-8
pid_one_command: /usr/lib/systemd/systemd

- name: rockylinux-8
driver:
image: dokken/rockylinux-8
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN yum -y install sudo

- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install sudo -y

- name: ubuntu-20.04
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install sudo -y

- name: ubuntu-22.04
driver:
image: dokken/ubuntu-22.04
pid_one_command: /bin/systemd
15 changes: 9 additions & 6 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@ driver:
name: vagrant

provisioner:
name: chef_solo
name: chef_infra
product_name: chef
enforce_idempotency: true
chef_license: accept-no-persist
multiple_converge: 2
solo_rb:
treat_deprecation_warnings_as_errors: true
enforce_idempotency: true
deprecations_as_errors: true

verifier:
name: inspec

platforms:
- name: almalinux-8
- name: centos-7
- name: centos-8
- name: debian-9
- name: centos-stream-8
- name: debian-10
- name: debian-11
- name: rockylinux-8
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: ubuntu-22.04

suites:
- name: default
Expand Down
6 changes: 3 additions & 3 deletions libraries/package_deps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Chef
module Rbenv
module MacOs
def openssl_prefix
`/usr/local/bin/brew --prefix openssl`.strip!
`/usr/local/bin/brew --prefix openssl@1.1`.strip!
end
end

Expand All @@ -20,7 +20,7 @@ def cruby_package_deps
%w( gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev make patch )
end
when 'ubuntu'
if node['platform_version'].to_i == 20
if node['platform_version'].to_i >= 20
%w( gcc autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev make patch )
elsif node['platform_version'].to_i == 18
%w( gcc autoconf bison build-essential libssl1.0-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev make patch )
Expand All @@ -31,7 +31,7 @@ def cruby_package_deps
when 'suse'
%w( gcc make automake gdbm-devel libyaml-devel ncurses-devel readline-devel zlib-devel libopenssl-devel patch )
when 'mac_os_x'
%w( openssl readline )
%w( openssl@1.1 readline )
end
end

Expand Down
3 changes: 2 additions & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
description 'Manages the ruby-build framework and its installed rubies. A LWRP is also defined.'
source_url 'https://github.com/sous-chefs/ruby_build'
issues_url 'https://github.com/sous-chefs/ruby_build/issues'

chef_version '>= 15.3'
version '2.2.0'
version '2.3.4'

supports 'ubuntu'
supports 'debian'
Expand Down
11 changes: 11 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"packageRules": [{
"matchUpdateTypes": ["patch", "pin", "digest"],
"automerge": true,
"addLabels": ["Release: Patch", "Skip: Announcements"]
}]
}
6 changes: 6 additions & 0 deletions resources/definition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
default: '/usr/local/ruby',
description: 'Location to install Ruby'

property :verbose, [true, false],
default: false,
description: 'print compilation status to stdout'

# NOTE: adding the Ruby version to the installation prefix
# by default is unexpected and will likely lead to user
# problems. Now defaults to false.
Expand Down Expand Up @@ -64,6 +68,8 @@
installation_path,
].join(' ')

ruby_build_cmd += ' --verbose' if new_resource.verbose

if new_resource.patch
patch_path = "#{Chef::Config[:file_cache_path]}/#{new_resource.patch}"
ruby_build_cmd += %( --patch < "#{patch_path}" )
Expand Down
Loading

0 comments on commit 8f7667d

Please sign in to comment.