Skip to content
Merged
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
32 changes: 31 additions & 1 deletion .github/workflows/tag_deploy_rubygem.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Create GitHub release, build & publish .gem to rubygems.org on SemVer tag push
# Create GitHub release, build & publish .gem to rubygems.org and Puppet Forge on SemVer tag push
#
# This workflow's jobs are only triggered in repos under the `simp` organization
# ------------------------------------------------------------------------------
Expand All @@ -16,6 +16,7 @@
# GitHub Secret variable Type Notes
# ------------------------ -------- ----------------------------------------
# RUBYGEMS_API_KEY Required
# PUPPETFORGE_API_TOKEN Required
#
# ------------------------------------------------------------------------------
#
Expand Down Expand Up @@ -210,3 +211,32 @@ jobs:

echo "Running '$RELEASE_COMMAND'..."
$RELEASE_COMMAND

deploy-to-puppet-forge:
name: 'Deploy PuppetForge Release'
needs: [ create-github-release ]
if: (github.repository_owner == 'simp') && (needs.create-github-release.outputs.prerelease != 'yes')
runs-on: ubuntu-latest
env:
PUPPETFORGE_API_TOKEN: ${{ secrets.PUPPETFORGE_API_TOKEN }}
FORGE_USER_AGENT: GitHubActions-ForgeReleng-Workflow/0.4.1 (Purpose/forge-ops-for-${{ github.event.repository.name }})
FORGE_API_URL: https://forgeapi.puppet.com/v3/releases
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.ref }}
clean: true
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.9
bundler-cache: true
- name: Build Puppet module (PDK)
run: bundle exec pdk build --force
- name: Deploy to Puppet Forge (skipped when prerelease)
run: |
curl -X POST --silent --show-error --fail \
--user-agent "$FORGE_USER_AGENT" \
--header "Authorization: Bearer ${PUPPETFORGE_API_TOKEN}" \
--form "file=@$(find $PWD/pkg -name ''*.tar.gz'')" \
"$FORGE_API_URL"
60 changes: 60 additions & 0 deletions .pdkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# .pdkignore masks files from inclusion by `pdk build`.
#
# It is used by CI when building modules to publish to the Puppet Forge and to
# mask symlinks from the `pdk build` test in the module's RELENG checks.
# ------------------------------------------------------------------------------
# NOTICE: **This file is maintained with puppetsync**
#
# This file is automatically updated as part of a puppet module baseline.
# The next baseline sync will overwrite any local changes made to this file.
# ------------------------------------------------------------------------------
.*.sw?
.git/
.metadata
.yardoc
.yardwarns
*.iml
/.bundle/
/.idea/
/.vagrant/
/coverage/
/bin/
/doc/
/Gemfile.local
/Gemfile.lock
/junit/
/log/
/pkg/
/dist/
/tmp/
/vendor/
/.vendor/
/convert_report.txt
/update_report.txt
.DS_Store
.project
.envrc
/inventory.yaml
/appveyor.yml
/.fixtures.yml
/Gemfile
/.gitattributes
/.gitignore
/.github/
/.gitlab-ci.yml
/.pdkignore
/.puppet-lint.rc
/.sync.yml
/.pmtignore
/Rakefile
/rakelib/
/.rspec
/.rubocop.yml
/.travis.yml
/.yardopts
/spec/
/.vscode/
/tests/
/renovate.json
/exe/
/*.gemspec
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@

source 'https://rubygems.org'

ENV['PDK_DISABLE_ANALYTICS'] ||= 'true'

# Specify your gem's dependencies in compliance_engine.gemspec
gemspec

gem 'rake', '~> 13.3.0'

group :tests do
gem 'openvox', ENV.fetch('OPENVOX_VERSION', ENV.fetch('PUPPET_VERSION', '~> 8.0'))
# renovate: datasource=rubygems versioning=ruby
gem 'pdk', ENV.fetch('PDK_VERSION', ['>= 2.0', '< 4.0']), require: false if RUBY_VERSION < '4'
gem 'syslog', require: false
gem 'voxpupuli-test', '~> 13.0'
end
Expand Down
4 changes: 3 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"author": "Sicura",
"summary": "Hiera backend for Sicura Compliance Engine data",
"license": "Apache-2.0",
"source": "https://github.com/simp/rubygem-simp-compliance_engine",
"source": "https://github.com/simp/rubygem-simp-compliance_engine.git",
"project_page": "https://github.com/simp/rubygem-simp-compliance_engine",
"issues_url": "https://github.com/simp/rubygem-simp-compliance_engine/issues",
"dependencies": [
],
"operatingsystem_support": [
Expand Down
Loading