92 changes: 0 additions & 92 deletions .github/workflows/auto_release.yml

This file was deleted.

51 changes: 2 additions & 49 deletions .github/workflows/daily_unit_tests_with_nightly_puppet_gem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,11 @@ name: '[Daily] Unit Tests with nightly Puppet gem'
on:
schedule:
- cron: '0 5 * * 1-5'
workflow_dispatch:

jobs:
daily_unit_tests_with_nightly_puppet_gem:
name: ${{ matrix.os_type }} / Puppet${{ matrix.puppet_version }} gem / Ruby ${{ matrix.ruby }}
strategy:
matrix:
os: [ 'ubuntu-20.04', 'macos-latest', 'windows-2019' ]
puppet_version: [ 6, 7 ]
include:
- puppet_version: 6
ruby: 2.5
- puppet_version: 7
ruby: 2.7

- os: 'ubuntu-20.04'
os_type: 'Linux'
env_set_cmd: 'export '
gem_file: 'puppet-latest.gem'
- os: 'macos-latest'
os_type: 'macOS'
env_set_cmd: 'export '
gem_file: 'puppet-latest-universal-darwin.gem'
- os: 'windows-2019'
os_type: 'Windows'
env_set_cmd: '$env:'
gem_file: 'puppet-latest-x64-mingw32.gem'

runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install ruby version ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Install the latest nightly build of puppet${{ matrix.puppet_version }} gem
run: |
curl https://nightlies.puppet.com/downloads/gems/puppet${{ matrix.puppet_version }}-nightly/${{ matrix.gem_file }} --output puppet.gem --location
gem install puppet.gem -N
- name: Prepare testing environment with bundler
run: |
git config --global core.longpaths true
bundle config set system 'true'
bundle config set --local without 'release'
${{ matrix.env_set_cmd }}PUPPET_GEM_VERSION=$(ruby -e 'puts /puppet\s+\((.+)\)/.match(`gem list -eld puppet`)[1]')
bundle update --jobs 4 --retry 3
- name: Run unit tests
run: bundle exec rake parallel_spec
uses: "puppetlabs/phoenix-github-actions/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml@main"

notify-via-slack:
name: Notify workflow conclusion via Slack
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/jira.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Export issue to Jira

on:
issues:
types: [labeled]

permissions:
issues: write

jobs:
export:
uses: "puppetlabs/phoenix-github-actions/.github/workflows/jira.yml@main"
with:
jira-project: PA
jira-base-url: ${{ vars.jira_base_url }}
jira-user-email: ${{ vars.jira_user_email }}
secrets:
jira-api-token: ${{ secrets.JIRA_ISSUES_ACTION }}
44 changes: 3 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,6 @@ on:
workflow_dispatch:

jobs:
create-github-release:
name: Deploy GitHub Release
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
clean: true
fetch-depth: 0
- name: Get Version
id: gv
run: |
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
- name: Create Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ steps.gv.outputs.ver }}"
draft: false
prerelease: false

deploy-forge:
name: Deploy to Forge
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
clean: true
- name: "PDK Build"
uses: docker://puppet/pdk:nightly
with:
args: 'build'
- name: "Push to Forge"
uses: docker://puppet/pdk:nightly
with:
args: 'release publish --forge-token ${{ secrets.FORGE_API_KEY }} --force'
release:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release.yml@main"
secrets: "inherit"
15 changes: 15 additions & 0 deletions .github/workflows/release_prep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Release Prep"

on:
workflow_dispatch:
inputs:
version:
description: "Module version to be released. Must be a valid semver string. (1.2.3)"
required: true

jobs:
release_prep:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main"
with:
version: "${{ github.event.inputs.version }}"
secrets: "inherit"
40 changes: 2 additions & 38 deletions .github/workflows/static_code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,44 +6,8 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
static_code_analysis:
name: Run checks

env:
ruby_version: 2.6
extra_checks: check:symlinks check:git_ignore check:dot_underscore check:test_file

runs-on: 'ubuntu-20.04'
steps:
- name: Checkout current PR code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install ruby version ${{ env.ruby_version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby_version }}

- name: Prepare testing environment with bundler
run: |
git config --global core.longpaths true
bundle config set --local without 'release'
bundle update --jobs 4 --retry 3
- name: Run commits check
run: bundle exec rake commits

- name: Run rubocop check
run: bundle exec rake ${{ env.extra_checks }} rubocop

- name: Run syntax check
run: bundle exec rake ${{ env.extra_checks }} syntax syntax:hiera syntax:manifests syntax:templates

- name: Run lint check
run: bundle exec rake ${{ env.extra_checks }} lint

- name: Run metadata_lint check
run: bundle exec rake ${{ env.extra_checks }} metadata_lint
uses: "puppetlabs/phoenix-github-actions/.github/workflows/static_code_analysis.yaml@main"
16 changes: 16 additions & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Unit Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
Nightly:
uses: "puppetlabs/phoenix-github-actions/.github/workflows/unit_tests_with_nightly_puppet_gem.yaml@main"

Released:
uses: "puppetlabs/phoenix-github-actions/.github/workflows/unit_tests_with_released_puppet_gem.yaml@main"
60 changes: 0 additions & 60 deletions .github/workflows/unit_tests_with_nightly_puppet_gem.yaml

This file was deleted.

Loading