Skip to content

Commit 2cd8833

Browse files
authored
Merge pull request #137 from AsBuiltReport/feature/v2-refactor
v2.0.0-beta1
2 parents f7724e6 + e485211 commit 2cd8833

61 files changed

Lines changed: 16363 additions & 6079 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ body:
9090
I have read and followed the [bug reporting guidelines](https://www.asbuiltreport.com/dev-guide/contributing/#reporting-issues-and-bugs).
9191
required: true
9292
- label: >-
93-
I have read [the documentation](https://www.asbuiltreport.com/user-guide/new-asbuiltconfig),
93+
I have read [the documentation](https://www.asbuiltreport.com/user-guide/quickstart/),
9494
and referred to the [known issues](https://www.asbuiltreport.com/support/known-issues) before submitting this bug report.
9595
required: true
9696
- label: >-

.github/ISSUE_TEMPLATE/change_request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ body:
2626
If you are unsure of what a specific requirement means, please follow the links to learn about it and understand why it is necessary before submitting.
2727
options:
2828
- label: >-
29-
I have read [the documentation](https://www.asbuiltreport.com/user-guide/new-asbuiltconfig),
29+
I have read [the documentation](https://www.asbuiltreport.com/user-guide/quickstart/),
3030
and referred to the [known issues](https://www.asbuiltreport.com/support/known-issues) before submitting this change request.
3131
required: true
3232
- label: >-

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
## Checklist:
2929
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
3030
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
31-
- [ ] My code follows the code style of this project.
31+
- [ ] My code follows the [code style](https://www.asbuiltreport.com/dev-guide/contributing/#coding-style-guidelines) of this project.
3232
- [ ] My change requires a change to the documentation.
3333
- [ ] I have updated the documentation accordingly.
34-
- [ ] I have read the [**CONTRIBUTING**](https://www.asbuiltreport.com/about/contributing/) document.
34+
- [ ] I have read the [contributing](https://www.asbuiltreport.com/dev-guide/contributing/) documentation.

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Dependabot configuration for AsBuiltReport.VMware.vSphere
2+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
3+
4+
version: 2
5+
updates:
6+
# Monitor GitHub Actions
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
day: "monday"
12+
labels:
13+
- "dependencies"
14+
- "github-actions"
15+
commit-message:
16+
prefix: "ci"
17+
include: "scope"
18+
open-pull-requests-limit: 5
19+
20+
# Monitor PowerShell modules (via manifest)
21+
- package-ecosystem: "nuget"
22+
directory: "/"
23+
schedule:
24+
interval: "weekly"
25+
day: "monday"
26+
labels:
27+
- "dependencies"
28+
- "powershell"
29+
commit-message:
30+
prefix: "deps"
31+
include: "scope"
32+
open-pull-requests-limit: 5

.github/workflows/PSScriptAnalyzer.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ jobs:
55
name: Run PSScriptAnalyzer
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v5
8+
- uses: actions/checkout@v6
99
- name: lint
10-
uses: devblackops/github-action-psscriptanalyzer@master
10+
uses: alagoutte/github-action-psscriptanalyzer@master
1111
with:
1212
sendComment: true
1313
failOnErrors: true

.github/workflows/Pester.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Pester Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
pull_request:
9+
branches:
10+
- master
11+
- dev
12+
workflow_dispatch:
13+
14+
jobs:
15+
test:
16+
name: Pester Tests - ${{ matrix.os }}
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
os: [windows-latest, ubuntu-latest, macos-latest]
22+
23+
defaults:
24+
run:
25+
shell: pwsh
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
31+
- name: Set up PowerShell Gallery
32+
run: |
33+
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
34+
35+
- name: Install Pester
36+
run: |
37+
Install-Module -Name Pester -MinimumVersion 5.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser
38+
39+
- name: Install PScribo
40+
run: |
41+
Install-Module -Name PScribo -MinimumVersion 0.11.1 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser
42+
43+
- name: Install PSScriptAnalyzer
44+
run: |
45+
Install-Module -Name PSScriptAnalyzer -MinimumVersion 1.0.0 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser
46+
47+
- name: Install AsBuiltReport.Core
48+
run: |
49+
Install-Module -Name AsBuiltReport.Core -MinimumVersion 1.6.2 -Repository PSGallery -Force -AllowClobber -Scope CurrentUser
50+
51+
- name: Run Pester Tests
52+
run: |
53+
$CodeCoverageParam = @{}
54+
$OutputFormatParam = @{ OutputFormat = 'NUnitXml' }
55+
56+
# Only enable code coverage for Windows
57+
if ('${{ matrix.os }}' -eq 'windows-latest') {
58+
$CodeCoverageParam = @{ CodeCoverage = $true }
59+
}
60+
61+
.\Tests\Invoke-Tests.ps1 @CodeCoverageParam @OutputFormatParam
62+
63+
- name: Upload test results
64+
if: always()
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: test-results-${{ matrix.os }}
68+
path: Tests/testResults.xml
69+
retention-days: 30
70+
71+
- name: Upload code coverage to Codecov
72+
if: matrix.os == 'windows-latest'
73+
uses: codecov/codecov-action@v5
74+
with:
75+
files: ./Tests/coverage.xml
76+
flags: unit
77+
name: codecov-${{ matrix.os }}
78+
token: ${{ secrets.CODECOV_TOKEN }}
79+
fail_ci_if_error: false

.github/workflows/Release.yml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
jobs:
8-
publish-to-gallery:
8+
publish-to-psgallery:
99
runs-on: windows-latest
1010
steps:
1111
- uses: actions/checkout@v4
@@ -17,16 +17,28 @@ jobs:
1717
shell: pwsh
1818
run: |
1919
Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force
20+
- name: Set Prerelease string in manifest
21+
if: ${{ github.event.release.prerelease }}
22+
shell: pwsh
23+
run: |
24+
$tag = '${{ github.event.release.tag_name }}'
25+
if ($tag -match '-(.+)$') {
26+
$prerelease = $Matches[1]
27+
Update-ModuleManifest `
28+
-Path .\AsBuiltReport.VMware.vSphere\AsBuiltReport.VMware.vSphere.psd1 `
29+
-Prerelease $prerelease
30+
}
2031
- name: Test Module Manifest
2132
shell: pwsh
2233
run: |
23-
Test-ModuleManifest .\AsBuiltReport.VMware.vSphere.psd1
34+
Test-ModuleManifest .\AsBuiltReport.VMware.vSphere\AsBuiltReport.VMware.vSphere.psd1
2435
- name: Publish module to PowerShell Gallery
2536
shell: pwsh
2637
run: |
27-
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
38+
Publish-Module -Path .\AsBuiltReport.VMware.vSphere -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
2839
tweet:
29-
needs: publish-to-gallery
40+
needs: publish-to-psgallery
41+
if: ${{ !github.event.release.prerelease }}
3042
runs-on: ubuntu-latest
3143
steps:
3244
- uses: Eomm/why-don-t-you-tweet@v2
@@ -41,13 +53,40 @@ jobs:
4153
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
4254
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
4355
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
56+
tweet-prerelease:
57+
needs: publish-to-psgallery
58+
if: ${{ github.event.release.prerelease }}
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: Eomm/why-don-t-you-tweet@v2
62+
# We don't want to tweet if the repository is not a public one
63+
if: ${{ !github.event.repository.private }}
64+
with:
65+
tweet-message: "[Pre-release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }} is now available for testing! Install with -AllowPrerelease ${{ github.event.release.html_url }} #VMware #vSphere #AsBuiltReport #vExpert"
66+
env:
67+
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
68+
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
69+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
70+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
4471
bsky-post:
45-
needs: publish-to-gallery
72+
needs: publish-to-psgallery
73+
if: ${{ !github.event.release.prerelease }}
4674
runs-on: ubuntu-latest
4775
steps:
4876
- uses: zentered/bluesky-post-action@v0.2.0
4977
with:
5078
post: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #VMware #vSphere #AsBuiltReport #vExpert"
79+
env:
80+
BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }}
81+
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}
82+
bsky-post-prerelease:
83+
needs: publish-to-psgallery
84+
if: ${{ github.event.release.prerelease }}
85+
runs-on: ubuntu-latest
86+
steps:
87+
- uses: zentered/bluesky-post-action@v0.2.0
88+
with:
89+
post: "[Pre-release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }} is now available for testing! Install with -AllowPrerelease ${{ github.event.release.html_url }} #VMware #vSphere #AsBuiltReport #vExpert"
5190
env:
5291
BSKY_IDENTIFIER: ${{ secrets.BSKY_IDENTIFIER }}
5392
BSKY_PASSWORD: ${{ secrets.BSKY_PASSWORD }}

.github/workflows/Stale.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '30 1 * * *'
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v9
11+
with:
12+
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
13+
days-before-stale: 90
14+
days-before-close: 7
15+
exempt-pr-labels: 'help wanted,enhancement,security,pinned'
16+
stale-pr-label: 'wontfix'
17+
stale-issue-label: 'wontfix'
18+
exempt-issue-labels: 'help wanted,enhancement,security,pinned'
19+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.claude/

AsBuiltReport.VMware.vSphere.json

-5.13 KB
Binary file not shown.

0 commit comments

Comments
 (0)