Showing with 1,665 additions and 807 deletions.
  1. +8 −5 .github/workflows/ci.yml
  2. +7 −2 .github/workflows/labeller.yml
  3. +16 −3 .github/workflows/nightly.yml
  4. +1 −1 .gitignore
  5. +3 −6 .pdkignore
  6. +643 −8 .rubocop.yml
  7. +8 −164 .rubocop_todo.yml
  8. +0 −4 .sync.yml
  9. +20 −3 CHANGELOG.md
  10. +28 −23 Gemfile
  11. +8 −3 README.md
  12. +46 −0 REFERENCE.md
  13. +2 −81 Rakefile
  14. +50 −0 lib/puppet/functions/sqlserver/partial_params_args.rb
  15. +1 −2 lib/puppet/provider/sqlserver_features/mssql.rb
  16. +1 −2 lib/puppet/provider/sqlserver_instance/mssql.rb
  17. +1 −8 lib/puppet_x/sqlserver/features.rb
  18. +1 −2 lib/puppet_x/sqlserver/server_helper.rb
  19. +134 −2 manifests/database.pp
  20. +30 −12 manifests/login.pp
  21. +21 −2 manifests/login/permissions.pp
  22. +62 −4 manifests/role.pp
  23. +26 −2 manifests/role/permissions.pp
  24. +10 −3 manifests/sp_configure.pp
  25. +21 −8 manifests/user.pp
  26. +24 −2 manifests/user/permissions.pp
  27. +5 −6 metadata.json
  28. +0 −4 provision.yaml
  29. +2 −2 readmes/README_ja_JP.md
  30. +2 −2 spec/README.md
  31. +7 −1 spec/acceptance/sqlserver_config_spec.rb
  32. +3 −0 spec/acceptance/sqlserver_instance_spec.rb
  33. +3 −0 spec/acceptance/z_last_sqlserver_features_spec.rb
  34. +4 −3 spec/default_facts.yml
  35. +29 −0 spec/functions/partial_params_args_spec.rb
  36. +3 −3 spec/spec_helper.rb
  37. +21 −11 spec/spec_helper_acceptance_local.rb
  38. +2 −8 spec/sql_testing_helpers.rb
  39. +1 −3 spec/unit/puppet/provider/sqlserver_instance_spec.rb
  40. +0 −1 spec/unit/puppet/sqlserver_spec_helper.rb
  41. +106 −0 templates/create/database.sql.epp
  42. +0 −117 templates/create/database.sql.erb
  43. +15 −0 templates/create/login/permission.sql.epp
  44. +0 −17 templates/create/login/permission.sql.erb
  45. +10 −0 templates/create/role.sql.epp
  46. +0 −10 templates/create/role.sql.erb
  47. +30 −0 templates/create/role/members.sql.epp
  48. +0 −30 templates/create/role/members.sql.erb
  49. +14 −0 templates/create/role/permissions.sql.epp
  50. +0 −15 templates/create/role/permissions.sql.erb
  51. +8 −0 templates/create/sp_configure.sql.epp
  52. +0 −8 templates/create/sp_configure.sql.erb
  53. +16 −0 templates/create/user/permission.sql.epp
  54. +0 −17 templates/create/user/permission.sql.erb
  55. +3 −3 templates/delete/{database.sql.erb → database.sql.epp}
  56. +18 −0 templates/delete/role.sql.epp
  57. +0 −18 templates/delete/role.sql.erb
  58. +5 −0 templates/instance_config.epp
  59. +0 −5 templates/instance_config.erb
  60. +43 −0 templates/query/database_exists.sql.epp
  61. +0 −24 templates/query/database_exists.sql.erb
  62. +7 −0 templates/query/login/permission_exists.sql.epp
  63. +0 −8 templates/query/login/permission_exists.sql.erb
  64. +24 −24 templates/query/{login_exists.sql.erb → login_exists.sql.epp}
  65. +22 −0 templates/query/role/member_exists.sql.epp
  66. +0 −22 templates/query/role/member_exists.sql.erb
  67. +8 −0 templates/query/role/permission_exists.sql.epp
  68. +0 −9 templates/query/role/permission_exists.sql.erb
  69. +7 −0 templates/query/role_exists.sql.epp
  70. +0 −7 templates/query/role_exists.sql.erb
  71. +3 −0 templates/query/sp_configure.sql.epp
  72. +0 −3 templates/query/sp_configure.sql.erb
  73. +7 −0 templates/query/user/permission_exists.sql.epp
  74. +0 −9 templates/query/user/permission_exists.sql.erb
  75. +4 −0 templates/query/user_exists.sql.epp
  76. +0 −4 templates/query/user_exists.sql.erb
  77. +2 −0 templates/restart_service.ps1.epp
  78. +0 −2 templates/restart_service.ps1.erb
  79. +1 −0 templates/snippets/database/collation_exists.sql.epp
  80. +0 −1 templates/snippets/database/collation_exists.sql.erb
  81. +1 −0 templates/snippets/database/compatibility_exists.sql.epp
  82. +0 −1 templates/snippets/database/compatibility_exists.sql.erb
  83. +1 −0 templates/snippets/database/containment_exists.sql.epp
  84. +0 −1 templates/snippets/database/containment_exists.sql.erb
  85. +1 −0 templates/snippets/database/db_chaining_exists.sql.epp
  86. +0 −1 templates/snippets/database/db_chaining_exists.sql.erb
  87. +2 −2 ...ts/database/{default_fulltext_language_exists.sql.erb → default_fulltext_language_exists.sql.epp}
  88. +2 −2 templates/snippets/database/{default_language_exists.sql.erb → default_language_exists.sql.epp}
  89. +1 −0 templates/snippets/database/nested_triggers_exists.sql.epp
  90. +0 −1 templates/snippets/database/nested_triggers_exists.sql.erb
  91. +1 −0 templates/snippets/database/transform_noise_words_exists.sql.epp
  92. +0 −1 templates/snippets/database/transform_noise_words_exists.sql.erb
  93. +1 −0 templates/snippets/database/trustworthy_exists.sql.epp
  94. +0 −1 templates/snippets/database/trustworthy_exists.sql.erb
  95. +1 −1 ...s/snippets/database/{two_digit_year_cutoff_exists.sql.erb → two_digit_year_cutoff_exists.sql.epp}
  96. +1 −1 templates/snippets/login/{get_perm_state.sql.erb → get_perm_state.sql.epp}
  97. +4 −0 templates/snippets/login/permission/exists.sql.epp
  98. +0 −4 templates/snippets/login/permission/exists.sql.erb
  99. +1 −1 templates/snippets/principal/permission/{exists.sql.erb → exists.sql.epp}
  100. +2 −2 templates/snippets/principal/permission/{get_perm_state.sql.erb → get_perm_state.sql.epp}
  101. +11 −0 templates/snippets/role/declare_and_set_variables.sql.epp
  102. +0 −11 templates/snippets/role/declare_and_set_variables.sql.erb
  103. +3 −0 templates/snippets/role/exists.sql.epp
  104. +0 −3 templates/snippets/role/exists.sql.erb
  105. +5 −0 templates/snippets/role/member_exists.sql.epp
  106. +0 −5 templates/snippets/role/member_exists.sql.erb
  107. +4 −0 templates/snippets/role/owner_check.sql.epp
  108. +0 −4 templates/snippets/role/owner_check.sql.erb
  109. +11 −0 templates/snippets/role/populate_purge_members.sql.epp
  110. +0 −11 templates/snippets/role/populate_purge_members.sql.erb
  111. +4 −0 templates/snippets/user/permission/exists.sql.epp
  112. +0 −4 templates/snippets/user/permission/exists.sql.erb
  113. +1 −1 templates/snippets/user/permission/{get_perm_state.sql.erb → get_perm_state.sql.epp}
13 changes: 8 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: "ci"

on:
pull_request:
branches:
- "main"
pull_request_target:
types: [opened, synchronize, reopened]
workflow_dispatch:

env:
Expand All @@ -23,8 +22,10 @@ jobs:

steps:

- name: Checkout Source
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
if: ${{ github.repository_owner == 'puppetlabs' }}

- name: Activate Ruby 2.7
Expand Down Expand Up @@ -62,8 +63,10 @@ jobs:
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'

steps:
- name: Checkout Source
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/labeller.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
name: community-labeller
name: Labeller

on:
issues:
types:
- opened
- labeled
- unlabeled
pull_request_target:
types:
- opened
- labeled
- unlabeled

jobs:
label:
runs-on: ubuntu-latest
steps:

- uses: puppetlabs/community-labeller@v0
- uses: puppetlabs/community-labeller@v1.0.1
name: Label issues or pull requests
with:
label_name: community
label_color: '5319e7'
org_membership: puppetlabs
fail_if_member: 'true'
token: ${{ secrets.IAC_COMMUNITY_LABELER }}
19 changes: 16 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ jobs:

steps:

- name: Checkout Source
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
if: ${{ github.repository_owner == 'puppetlabs' }}

- name: Activate Ruby 2.7
Expand Down Expand Up @@ -60,8 +62,10 @@ jobs:
FACTER_GEM_VERSION: 'https://github.com/puppetlabs/facter#main'

steps:
- name: Checkout Source
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Activate Ruby 2.7
uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -108,7 +112,16 @@ jobs:
- name: Run acceptance tests
run: |
bundle exec rake 'litmus:acceptance:parallel'
for i in 1 2 3; do
if bundle exec rake 'litmus:acceptance:parallel'; then
break
elif [ "$i" -lt 3 ]; then
echo "Retrying acceptance tests (Attempt $i)"
else
echo "Acceptance tests failed after $i attempts."
exit 1
fi
done
- name: Remove test environment
if: ${{ always() }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/spec/fixtures/modules/*
/tmp/
/vendor/
/convert_report.txt
Expand Down
9 changes: 3 additions & 6 deletions .pdkignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/log/
/pkg/
/spec/fixtures/manifests/
/spec/fixtures/modules/
/spec/fixtures/modules/*
/tmp/
/vendor/
/convert_report.txt
Expand All @@ -26,20 +26,17 @@
.envrc
/inventory.yaml
/spec/fixtures/litmus_inventory.yaml
/appveyor.yml
/.editorconfig
/.fixtures.yml
/Gemfile
/.gitattributes
/.github/
/.gitignore
/.gitlab-ci.yml
/.pdkignore
/.puppet-lint.rc
/Rakefile
/rakelib/
/.rspec
/.rubocop.yml
/.travis.yml
/..yml
/.yardopts
/spec/
/.vscode/
Expand Down
Loading