File tree Expand file tree Collapse file tree 5 files changed +71
-9
lines changed Expand file tree Collapse file tree 5 files changed +71
-9
lines changed Original file line number Diff line number Diff line change
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 }}
Original file line number Diff line number Diff line change 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 )
2
15
3
16
## [ 1.0.1]
4
17
Original file line number Diff line number Diff line change @@ -152,6 +152,12 @@ The `Healthcheck` section of the Rubrik CDM As Built Report is not currently uti
152
152
``` powershell
153
153
New-AsBuiltReport -Target 'cluster1.domain.local' -Username 'administrator@domain.local' -Password 'SuperSecret' -Report Rubrik.CDM -Format Html,Word -OutputFolderPath 'C:\Reports' -Timestamp
154
154
```
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
+ ```
155
161
- Generate HTML & Text reports
156
162
157
163
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'
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ function Invoke-AsBuiltReport.Rubrik.CDM {
5
5
. DESCRIPTION
6
6
Documents the configuration of the Rubrik CDM in Word/HTML/XML/Text formats using PScribo.
7
7
. NOTES
8
- Version: 1.0.1
8
+ Version: 1.0.2
9
9
Author: Mike Preston
10
10
Twitter: @mwpreston
11
11
Github: mwpreston
@@ -19,18 +19,13 @@ function Invoke-AsBuiltReport.Rubrik.CDM {
19
19
param (
20
20
[String []] $Target ,
21
21
[PSCredential ] $Credential ,
22
- [String ]$StylePath
22
+ [String ] $Token
23
23
)
24
24
25
25
# Import JSON Configuration for Options and InfoLevel
26
26
$InfoLevel = $ReportConfig.InfoLevel
27
27
$Options = $ReportConfig.Options
28
28
29
- # If custom style not set, use default style
30
- if (! $StylePath ) {
31
- & " $PSScriptRoot \..\..\AsBuiltReport.Rubrik.CDM.Style.ps1"
32
- }
33
-
34
29
# region Script Functions
35
30
# ---------------------------------------------------------------------------------------------#
36
31
# SCRIPT FUNCTIONS #
@@ -51,7 +46,12 @@ function Invoke-AsBuiltReport.Rubrik.CDM {
51
46
foreach ($brik in $Target ) {
52
47
try {
53
48
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
+ }
55
55
} catch {
56
56
Write-Error $_
57
57
}
You can’t perform that action at this time.
0 commit comments