Skip to content

Commit 88d7467

Browse files
authored
Merge pull request #22 from AsBuiltReport/dev
v1.0.2 release
2 parents 18ad96a + 2bd4bcc commit 88d7467

File tree

5 files changed

+71
-9
lines changed

5 files changed

+71
-9
lines changed

.github/workflows/Release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Publish PowerShell Module
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-to-gallery:
9+
runs-on: windows-2019
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set PSRepository to Trusted for PowerShell Gallery
13+
shell: pwsh
14+
run: |
15+
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
16+
- name: Install AsBuiltReport.Core module
17+
shell: pwsh
18+
run: |
19+
Install-Module -Name AsBuiltReport.Core -Repository PSGallery -Force
20+
- name: Test Module Manifest
21+
shell: pwsh
22+
run: |
23+
Test-ModuleManifest .\AsBuiltReport.Rubrik.CDM.psd1
24+
- name: Publish module to PowerShell Gallery
25+
shell: pwsh
26+
run: |
27+
Publish-Module -Path ./ -NuGetApiKey ${{ secrets.PSGALLERY_API_KEY }} -Verbose
28+
tweet:
29+
needs: publish-to-gallery
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: Eomm/why-don-t-you-tweet@v1
33+
# We don't want to tweet if the repository is not a public one
34+
if: ${{ !github.event.repository.private }}
35+
with:
36+
# GitHub event payload
37+
# https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#release
38+
tweet-message: "[New Release] ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}! Check out what's new! ${{ github.event.release.html_url }} #Rubrik #AsBuiltReport #PowerShell #DataProtection"
39+
env:
40+
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
41+
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
42+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
43+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

AsBuiltReport.Rubrik.CDM.psd1

0 Bytes
Binary file not shown.

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
1-
# Rubrik CDM As Built Report Changelog
1+
# :arrows_clockwise: Rubrik CDM As Built Report Changelog
2+
3+
## [1.0.2] - 2022-10-19
4+
5+
### Changed
6+
* Added new `Token` parameter to support the ability to connect with an API Token
7+
* Changed Required Modules to AsBuiltReport.Core v1.2.0
8+
* Removed `StylePath` parameter from `Invoke-AsBuiltReport.Rubrik.CDM.ps1`
9+
10+
### Added
11+
* Added GitHub workflow for release actions
12+
13+
### Fixed
14+
* Fixes [#21](https://github.com/AsBuiltReport/AsBuiltReport.Rubrik.CDM/issues/21)
215

316
## [1.0.1]
417

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ The `Healthcheck` section of the Rubrik CDM As Built Report is not currently uti
152152
```powershell
153153
New-AsBuiltReport -Target 'cluster1.domain.local' -Username 'administrator@domain.local' -Password 'SuperSecret' -Report Rubrik.CDM -Format Html,Word -OutputFolderPath 'C:\Reports' -Timestamp
154154
```
155+
- Generate HTML & Word reports using API Token authentication
156+
157+
Generate a Rubrik CDM As Built Report for a cluster named 'cluster1.domain.local' using specified API Token. Export report to HTML & DOCX formats. Use default report style. Append timestamp to report filename. Save reports to 'C:\Reports\'
158+
```powershell
159+
New-AsBuiltReport -Target 'cluster1.domain.local' -Token '1234abcd' -Report Rubrik.CDM -Format Html,Word -OutputFolderPath 'C:\Reports' -Timestamp
160+
```
155161
- Generate HTML & Text reports
156162

157163
Generate a Rubrik CDM As Built Report for a cluster named 'cluster1.domain.local' using stored credentials. Export report to HTML & Text formats. Use default report style. Save reports to 'C:\Reports'

Src/Public/Invoke-AsBuiltReport.Rubrik.CDM.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.Rubrik.CDM {
55
.DESCRIPTION
66
Documents the configuration of the Rubrik CDM in Word/HTML/XML/Text formats using PScribo.
77
.NOTES
8-
Version: 1.0.1
8+
Version: 1.0.2
99
Author: Mike Preston
1010
Twitter: @mwpreston
1111
Github: mwpreston
@@ -19,18 +19,13 @@ function Invoke-AsBuiltReport.Rubrik.CDM {
1919
param (
2020
[String[]] $Target,
2121
[PSCredential] $Credential,
22-
[String]$StylePath
22+
[String] $Token
2323
)
2424

2525
# Import JSON Configuration for Options and InfoLevel
2626
$InfoLevel = $ReportConfig.InfoLevel
2727
$Options = $ReportConfig.Options
2828

29-
# If custom style not set, use default style
30-
if (!$StylePath) {
31-
& "$PSScriptRoot\..\..\AsBuiltReport.Rubrik.CDM.Style.ps1"
32-
}
33-
3429
#region Script Functions
3530
#---------------------------------------------------------------------------------------------#
3631
# SCRIPT FUNCTIONS #
@@ -51,7 +46,12 @@ function Invoke-AsBuiltReport.Rubrik.CDM {
5146
foreach ($brik in $Target) {
5247
try {
5348
Write-PScriboMessage -Message "[Rubrik] [$($brik)] [Connection] Connecting to $($brik)"
54-
$RubrikCluster = Connect-Rubrik -Server $brik -Credential $Credential -ErrorAction Stop
49+
if ($Credential) {
50+
$RubrikCluster = Connect-Rubrik -Server $brik -Credential $Credential -ErrorAction Stop
51+
}
52+
else {
53+
$RubrikCluster = Connect-Rubrik -Server $brik -Token $Token -ErrorAction Stop
54+
}
5555
} catch {
5656
Write-Error $_
5757
}

0 commit comments

Comments
 (0)