Showing with 767 additions and 1,247 deletions.
  1. +3 −1 .fixtures.yml
  2. +3 −84 .github/workflows/auto_release.yml
  3. +15 −5 .github/workflows/{pr_test.yml → ci.yml}
  4. +8 −2 .github/workflows/nightly.yml
  5. +3 −41 .github/workflows/release.yml
  6. +0 −126 .github/workflows/spec.yml
  7. +0 −3 .puppet-lint.rc
  8. +9 −439 .rubocop.yml
  9. +173 −15 .rubocop_todo.yml
  10. +6 −8 .sync.yml
  11. +20 −0 CHANGELOG.md
  12. +4 −4 Gemfile
  13. +3 −1 README.md
  14. +7 −11 REFERENCE.md
  15. +0 −4 Rakefile
  16. +2 −3 lib/puppet/parser/functions/sqlserver_is_domain_or_local_user.rb
  17. +1 −1 lib/puppet/parser/functions/sqlserver_validate_hash_uniq_values.rb
  18. +6 −13 lib/puppet/parser/functions/sqlserver_validate_instance_name.rb
  19. +3 −5 lib/puppet/parser/functions/sqlserver_validate_range.rb
  20. +4 −11 lib/puppet/parser/functions/sqlserver_validate_size.rb
  21. +2 −3 lib/puppet/property/sqlserver_login.rb
  22. +12 −12 lib/puppet/property/sqlserver_tsql.rb
  23. +33 −35 lib/puppet/provider/sqlserver.rb
  24. +8 −14 lib/puppet/provider/sqlserver_features/mssql.rb
  25. +23 −23 lib/puppet/provider/sqlserver_instance/mssql.rb
  26. +2 −4 lib/puppet/provider/sqlserver_tsql/mssql.rb
  27. +2 −0 lib/puppet/type/sqlserver_features.rb
  28. +9 −11 lib/puppet/type/sqlserver_instance.rb
  29. +4 −7 lib/puppet/type/sqlserver_tsql.rb
  30. +42 −38 lib/puppet_x/sqlserver/features.rb
  31. +6 −7 lib/puppet_x/sqlserver/server_helper.rb
  32. +8 −8 lib/puppet_x/sqlserver/sql_connection.rb
  33. +8 −8 manifests/config.pp
  34. +2 −2 manifests/database.pp
  35. +7 −7 manifests/login.pp
  36. +6 −6 manifests/role.pp
  37. +6 −6 manifests/user.pp
  38. +4 −4 metadata.json
  39. +5 −5 spec/acceptance/sqlserver_config_spec.rb
  40. +3 −4 spec/acceptance/sqlserver_database_spec.rb
  41. +4 −4 spec/acceptance/sqlserver_instance_spec.rb
  42. +13 −14 spec/acceptance/sqlserver_login_spec.rb
  43. +8 −7 spec/acceptance/sqlserver_role_spec.rb
  44. +13 −14 spec/acceptance/sqlserver_tsql_spec.rb
  45. +5 −11 spec/acceptance/sqlserver_user_spec.rb
  46. +3 −3 spec/acceptance/z_last_sqlserver_features_spec.rb
  47. +11 −11 spec/defines/config_spec.rb
  48. +26 −12 spec/defines/database_spec.rb
  49. +15 −7 spec/defines/login/permissions_spec.rb
  50. +10 −7 spec/defines/login_spec.rb
  51. +6 −5 spec/defines/manifest_shared_examples.rb
  52. +12 −10 spec/defines/role/permissions_spec.rb
  53. +19 −14 spec/defines/role_spec.rb
  54. +5 −5 spec/defines/sp_configure_spec.rb
  55. +20 −9 spec/defines/user/permissions_spec.rb
  56. +7 −6 spec/defines/user_spec.rb
  57. +2 −0 spec/functions/sqlserver_upcase_spec.rb
  58. +1 −0 spec/functions/sqlserver_validate_size_spec.rb
  59. +3 −3 spec/spec_helper.rb
  60. +24 −30 spec/spec_helper_acceptance_local.rb
  61. +32 −33 spec/sql_testing_helpers.rb
  62. +2 −1 spec/unit/puppet/property/tsql_spec.rb
  63. +7 −11 spec/unit/puppet/provider/sqlserver_features_spec.rb
  64. +21 −22 spec/unit/puppet/provider/sqlserver_instance_spec.rb
  65. +14 −12 spec/unit/puppet/provider/sqlserver_tsql_spec.rb
  66. +1 −1 spec/unit/puppet/sqlserver_install_context.rb
  67. +2 −4 spec/unit/puppet/sqlserver_spec_helper.rb
  68. +1 −1 spec/unit/puppet/type/sqlserver_features_spec.rb
  69. +1 −1 spec/unit/puppet/type/sqlserver_instance_spec.rb
  70. +13 −8 spec/unit/puppet_x/sql_connection_spec.rb
  71. +4 −0 templates/instance_config.erb
4 changes: 3 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
fixtures:
repositories:
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
puppet_agent:
repo: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
ref: v4.13.0
provision: 'https://github.com/puppetlabs/provision.git'
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
mount_iso: 'https://github.com/puppetlabs/puppetlabs-mount_iso.git'
Expand Down
87 changes: 3 additions & 84 deletions .github/workflows/auto_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,88 +3,7 @@ name: "Auto release"
on:
workflow_dispatch:

env:
HONEYCOMB_WRITEKEY: 7f3c63a70eecc61d635917de46bea4e6
HONEYCOMB_DATASET: litmus tests
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
auto_release:
name: "Automatic release prep"
runs-on: ubuntu-20.04

steps:

- name: "Honeycomb: Start recording"
uses: puppetlabs/kvrhdn-gha-buildevents@pdk-templates-v1
with:
apikey: ${{ env.HONEYCOMB_WRITEKEY }}
dataset: ${{ env.HONEYCOMB_DATASET }}
job-status: ${{ job.status }}

- name: "Honeycomb: start first step"
run: |
echo STEP_ID="auto-release" >> $GITHUB_ENV
echo STEP_START=$(date +%s) >> $GITHUB_ENV
- name: "Checkout Source"
if: ${{ github.repository_owner == 'puppetlabs' }}
uses: actions/checkout@v3
with:
fetch-depth: 0
persist-credentials: false

- name: "PDK Release prep"
uses: docker://puppet/pdk:2.6.1.0
with:
args: 'release prep --force'
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "Get Version"
if: ${{ github.repository_owner == 'puppetlabs' }}
id: gv
run: |
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
- name: "Check if a release is necessary"
if: ${{ github.repository_owner == 'puppetlabs' }}
id: check
run: |
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
- name: "Commit changes"
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
run: |
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Release prep v${{ steps.gv.outputs.ver }}"
- name: Create Pull Request
id: cpr
uses: puppetlabs/peter-evans-create-pull-request@v3
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
branch: "release-prep"
delete-branch: true
title: "Release prep v${{ steps.gv.outputs.ver }}"
body: |
Automated release-prep through [pdk-templates](https://github.com/puppetlabs/pdk-templates/blob/main/moduleroot/.github/workflows/auto_release.yml.erb) from commit ${{ github.sha }}.
Please verify before merging:
- [ ] last [nightly](https://github.com/${{ github.repository }}/actions/workflows/nightly.yml) run is green
- [ ] [Changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) is readable and has no unlabeled pull requests
- [ ] Ensure the [changelog](https://github.com/${{ github.repository }}/blob/release-prep/CHANGELOG.md) version and [metadata](https://github.com/${{ github.repository }}/blob/release-prep/metadata.json) version match
labels: "maintenance"

- name: PR outputs
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: "Honeycomb: Record finish step"
if: ${{ always() }}
run: |
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Finished auto release workflow'
release_prep:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_release_prep.yml@main"
secrets: "inherit"
20 changes: 15 additions & 5 deletions .github/workflows/pr_test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
name: "PR Testing"
name: "ci"

on: [pull_request]
on:
pull_request:
branches:
- "main"
workflow_dispatch:

env:
SERVICE_URL: https://facade-maint-config-windows-use-ssh-6f3kfepqcq-ew.a.run.app/v1/provision

jobs:
Spec:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
secrets: "inherit"

setup_matrix:
name: "Setup Test Matrix"
needs: "Spec"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
Expand Down Expand Up @@ -36,7 +45,6 @@ jobs:
id: get-matrix
run: |
bundle exec matrix_from_metadata_v2
bundle exec matrix_from_metadata_v2
Acceptance:
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
Expand All @@ -49,9 +57,11 @@ jobs:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}

env:
PUPPET_GEM_VERSION: '~> 7.24'
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'

steps:

- name: Checkout Source
uses: actions/checkout@v2

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ env:
SERVICE_URL: https://facade-maint-config-windows-use-ssh-6f3kfepqcq-ew.a.run.app/v1/provision

jobs:
Spec:
uses: "puppetlabs/cat-github-actions/.github/workflows/module_ci.yml@main"
secrets: "inherit"

setup_matrix:
name: "Setup Test Matrix"
needs: "Spec"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
Expand Down Expand Up @@ -38,7 +43,6 @@ jobs:
id: get-matrix
run: |
bundle exec matrix_from_metadata_v2
bundle exec matrix_from_metadata_v2
Acceptance:
name: "${{matrix.platforms.label}}, ${{matrix.collection}}"
Expand All @@ -51,9 +55,11 @@ jobs:
fail-fast: false
matrix: ${{fromJson(needs.setup_matrix.outputs.matrix)}}

env:
PUPPET_GEM_VERSION: '~> 7.24'
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'

steps:

- name: Checkout Source
uses: actions/checkout@v2

Expand Down
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"
126 changes: 0 additions & 126 deletions .github/workflows/spec.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
--relative
--no-parameter_types-check
--no-params_empty_string_assignment-check
--no-unquoted_string_in_selector-check
Loading