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

fix: release please configs #36

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@test-kitchen/maintainers
11 changes: 6 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
version: 2
updates:
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: bundler
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
22 changes: 0 additions & 22 deletions .github/workflows/ci.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: 'Lint, Unit & Integration Tests'

'on':
pull_request:

jobs:
lint-unit:
uses: test-kitchen/.github/.github/workflows/lint-unit.yml@main
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: release-please

"on":
push:
branches: [main]

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.PORTER_GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}

- name: Build and publish to GitHub Package
uses: actionshub/publish-gem-to-github@main
if: ${{ steps.release.outputs.release_created }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: ${{ secrets.OWNER }}

- name: Build and publish to RubyGems
uses: actionshub/publish-gem-to-rubygems@main
if: ${{ steps.release.outputs.release_created }}
with:
token: ${{ secrets.RUBYGEMS_API_KEY }}
7 changes: 7 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
default: true
MD004: false
MD012: false
MD013: false
MD024: false
MD033: false
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.24.0"
}
11 changes: 11 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
require:
- chefstyle

AllCops:
TargetRubyVersion: 3.1
Include:
- "**/*.rb"
Exclude:
- "vendor/**/*"
- "spec/**/*"
4 changes: 0 additions & 4 deletions .tailor

This file was deleted.

11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
## 0.1.0 / Unreleased

* Initial release
# Change Log
18 changes: 17 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
source 'https://rubygems.org'
source "https://rubygems.org"

# Specify your gem"s dependencies in kitchen-vagrant.gemspec
gemspec

group :test do
gem "rake"
gem "kitchen-inspec"
gem "rspec", "~> 3.2"
gem 'countloc'
end

group :debug do
gem "pry"
end

group :chefstyle do
gem "chefstyle"
end
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ To use the CloudStack public key provider, you need to have the .PEM file locate
your .kitchen.yml file, your home directory (\~), your .ssh directory (\~/.ssh/), or specify a directory (without any
trailing slahses) as your "keypair_search_directory" and the file be named the same as the Keypair on CloudStack
suffixed with .pem (e.g. the Keypair named "TestKey" should be located in one of the searched directories and named
"TestKey.pem").
"TestKey.pem").
This PEM file should be the PRIVATE key, not the PUBLIC key.

By default, a unique server name will be generated and the randomly generated password will be used, though that
Expand All @@ -63,7 +63,7 @@ behavior can be overridden with additional options (e.g., to specify a SSH priva
username: [SSH USER]
port: [SSH PORT]

host_name setting is useful if you are facing ENAMETOOLONG exceptions in the
host_name setting is useful if you are facing ENAMETOOLONG exceptions in the
chef run caused by long generated hostnames)

host_name: [A UNIQUE HOST NAME]
Expand Down
30 changes: 14 additions & 16 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
require 'bundler/gem_tasks'
require 'cane/rake_task'
require 'tailor/rake_task'
require "bundler/gem_tasks"

desc 'Run cane to check quality metrics'
Cane::RakeTask.new do |cane|
cane.canefile = './.cane'
require "rspec/core/rake_task"
desc "Run all specs in spec directory"
RSpec::Core::RakeTask.new(:test) do |t|
t.pattern = "spec/**/*_spec.rb"
end

Tailor::RakeTask.new

desc 'Display LOC stats'
task :stats do
puts "\n## Production Code Stats"
sh 'countloc -r lib'
begin
require "chefstyle"
require "rubocop/rake_task"
RuboCop::RakeTask.new(:style) do |task|
task.options += ["--display-cop-names", "--no-color"]
end
rescue LoadError
puts "chefstyle is not available. (sudo) gem install chefstyle to do style checking."
end

desc 'Run all quality tasks'
task :quality => [:cane, :tailor, :stats]

task :default => [:quality]
task default: %i{test style}
10 changes: 1 addition & 9 deletions kitchen-cloudstack.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_dependency 'test-kitchen', '>= 1.0.0', "< 3"
spec.add_dependency 'test-kitchen', '>= 1.0.0', "< 4"
spec.add_dependency 'fog-cloudstack', '~> 0.1.0'

spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake'

spec.add_development_dependency 'cane', '~> 3'
spec.add_development_dependency 'tailor', '~> 1'
spec.add_development_dependency 'countloc'
spec.add_development_dependency 'pry'
end
Loading
Loading