Compare commits

..

4 Commits

25 changed files with 73 additions and 82 deletions

View File

@ -1,32 +0,0 @@
# The full repository name
repo: OCram85/PSCredentialStore
# Service type (gitea or github)
service: gitea
# Base URL for Gitea instance if using gitea service type (optional)
# Default: https://gitea.com
base-url: https://gitea.ocram85.com
# Changelog groups and which labeled PRs to add to each group
groups:
- name: ✨ FEATURES
labels:
- feature
- name: 📦 META
labels:
- meta
- name: 🐛 BUGFIXES
labels:
- bug
- name: 🛠️ ENHANCEMENTS
labels:
- enhancement
- name: 📚 DOCS
labels:
- docs
- name: 🔖 MISC
default: true
# regex indicating which labels to skip for the changelog
skip-labels: skip-changelog|backport\/.+

View File

@ -120,7 +120,7 @@ steps:
Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force; Install-Module -Name 'DroneHelper' -Repository 'PSGallery' -ErrorAction 'Stop' -AllowPrerelease -Force;
Import-Module -Name 'DroneHelper' -ErrorAction 'Stop'; Import-Module -Name 'DroneHelper' -ErrorAction 'Stop';
Install-ModuleDependency; Install-ModuleDependency;
New-BuildPackage -Verbose -AdditionalPath @('./src/Vendor', './src/openssl.conf') New-BuildPackage -Verbose
}" }"
- name: GiteaRelease - name: GiteaRelease

1
.gitattributes vendored
View File

@ -21,5 +21,4 @@
# Vendor resources config # Vendor resources config
src/Vendor/libressl255/* filter=lfs diff=lfs merge=lfs -text src/Vendor/libressl255/* filter=lfs diff=lfs merge=lfs -text
src/Vendor/libressl/* filter=lfs diff=lfs merge=lfs -text
*.pfx filter=lfs diff=lfs merge=lfs -text *.pfx filter=lfs diff=lfs merge=lfs -text

View File

@ -1,25 +1,9 @@
# Changelog # Changelog
<!-- insertMark --> <!-- insertMark -->
## [v1.1.1](https://gitea.ocram85.com/OCram85/PSCredentialStore/releases/tag/v1.1.1) - 2022-10-10
* 📦 META
* Adds changelog config for gitea changelog cli tool (#77)
* 🐛 BUGFIXES
* Fix Set-CredentialStoreItem (#76)
* Fix optional module dependencies (#75)
### Contributors
* [@OCram85](https://gitea.ocram85.com/OCram85)
* [@pinguinfuss](https://gitea.ocram85.com/pinguinfuss)
## `v1.1.0` ## `v1.1.0`
- (3d4f53d) adds pinguinfuss contributed fix (#73) - (acb09ba) update Changelog
- (6fce8d6) Updates libressl files (#71)
- (ddb85d9) addChangelog (#70)
- (5bdb383) updates Readme (#69) - (5bdb383) updates Readme (#69)
- (a95ba31) remove optional depenency helper (#68) - (a95ba31) remove optional depenency helper (#68)
- (1e7dd78) adds CiscoUCSCentral connection type (#67) - (1e7dd78) adds CiscoUCSCentral connection type (#67)
@ -36,6 +20,7 @@
- (4abfec5) adds PR template (#55) - (4abfec5) adds PR template (#55)
- (7708df9) Update pwsh style to latest community standards (#52) - (7708df9) Update pwsh style to latest community standards (#52)
## `v1.0.542` ## `v1.0.542`
- 🧙 pre migrated Gitea version - 🧙 pre migrated Gitea version

View File

@ -66,7 +66,7 @@ function New-CSCertificate {
($PSVersionTable.PSEdition -eq 'Desktop' -and $PSVersionTable.PSVersion.Major -lt 6) -or ($PSVersionTable.PSEdition -eq 'Desktop' -and $PSVersionTable.PSVersion.Major -lt 6) -or
($IsWindows -eq $true) ($IsWindows -eq $true)
) { ) {
$openssl = Join-Path -Path $ModuleBase -ChildPath '/Vendor/libressl/openssl.exe' $openssl = Join-Path -Path $ModuleBase -ChildPath '/Vendor/libressl255/openssl.exe'
} }
$Env:OPENSSL_CONF = Join-Path $ModuleBase -ChildPath '/openssl.conf' $Env:OPENSSL_CONF = Join-Path $ModuleBase -ChildPath '/openssl.conf'

View File

@ -102,7 +102,7 @@ Describe "New-CredentialStoreItem" {
It "Missing CredentialStore should throw" { It "Missing CredentialStore should throw" {
{ {
New-CredentialStoreItem -Shared -Path '/tmp/missingStore.json' -RemoteHost 'notrelevant' New-CredentialStoreItem -Shared -Path '/tmp/missingStore.json' -RemoteHost 'notrelevant'
} | Should -Throw "The given credential store (/tmp/missingStore.json) does not exist!" } | Should -Throw "Could not add anything into the given CredentialStore."
} }
} }
Context "Testing pipeline paramter" { Context "Testing pipeline paramter" {

View File

@ -32,7 +32,7 @@ function New-CredentialStoreItem {
[None] [None]
.EXAMPLE .EXAMPLE
New-CredentialStoreItem -Path 'C:\TMP\mystore.json' -RemoteHost esx01.myside.local' New-CredentialStoreItem -Path "C:\TMP\mystore.json" -RemoteHost "esx01.myside.local"
#> #>
[CmdletBinding(DefaultParameterSetName = 'Private')] [CmdletBinding(DefaultParameterSetName = 'Private')]
@ -68,7 +68,7 @@ function New-CredentialStoreItem {
begin { begin {
# Set the CredentialStore for private, shared or custom mode. # Set the CredentialStore for private, shared or custom mode.
Write-Debug ('ParameterSetName: {0}' -f $PSCmdlet.ParameterSetName) Write-Debug ("ParameterSetName: {0}" -f $PSCmdlet.ParameterSetName)
if ($PSCmdlet.ParameterSetName -eq 'Private') { if ($PSCmdlet.ParameterSetName -eq 'Private') {
$Path = Get-DefaultCredentialStorePath $Path = Get-DefaultCredentialStorePath
} }
@ -84,9 +84,9 @@ function New-CredentialStoreItem {
if (-not(Test-CredentialStore -Shared -Path $Path)) { if (-not(Test-CredentialStore -Shared -Path $Path)) {
$MessageParams = @{ $MessageParams = @{
Exception = [System.IO.FileNotFoundException]::new( Exception = [System.IO.FileNotFoundException]::new(
'The given credential store ({0}) does not exist!' -f $Path 'Could not add anything into the given CredentialStore.'
) )
ErrorAction = 'Stop' ErrorAction = "Stop"
} }
Write-Error @MessageParams Write-Error @MessageParams
} }
@ -95,8 +95,8 @@ function New-CredentialStoreItem {
$CurrentDate = Get-Date -Format 'u' $CurrentDate = Get-Date -Format 'u'
if ($Identifier -ne '') { if ($Identifier -ne "") {
$CredentialName = $RemoteHost = '{0}/{1}' -f $Identifier, $RemoteHost $CredentialName = $RemoteHost = "{0}/{1}" -f $Identifier, $RemoteHost
} }
else { else {
$CredentialName = $RemoteHost $CredentialName = $RemoteHost

View File

@ -11,10 +11,10 @@
param () param ()
BeforeAll { BeforeAll {
$ManifestFile = (Get-Item -Path './src/*.psd1').FullName $ManifestFile = (Get-Item -Path "./src/*.psd1").FullName
Import-Module $ManifestFile -Force Import-Module $ManifestFile -Force
$PrivateFunctions = (Get-ChildItem -Path './src/Private/*.ps1' | Where-Object { $PrivateFunctions = (Get-ChildItem -Path "./src/Private/*.ps1" | Where-Object {
$_.BaseName -notmatch '.Tests' $_.BaseName -notmatch '.Tests'
} }
).FullName ).FullName
@ -23,25 +23,25 @@ BeforeAll {
} }
# Backup existing credential stores # Backup existing credential stores
$VerbosePreference = 'Continue' $VerbosePreference = "Continue"
Write-Verbose -Message 'Backup private Credential Store...' Write-Verbose "Backup private Credential Store..."
$CSPath = Get-DefaultCredentialStorePath $CSPath = Get-DefaultCredentialStorePath
$BackupFile = '{0}.back' -f $CSPath $BackupFile = "{0}.back" -f $CSPath
if (Test-Path -Path $CSPath) { if (Test-Path -Path $CSPath) {
Move-Item -Path $CSPath -Destination $BackupFile Move-Item -Path $CSPath -Destination $BackupFile
} }
Write-Verbose -Message 'Backup shared CredentialStore...' Write-Verbose "Backup shared CredentialStore..."
$CSShared = Get-DefaultCredentialStorePath -Shared $CSShared = Get-DefaultCredentialStorePath -Shared
$BackupSharedFile = '{0}.back' -f $CSShared $BackupSharedFile = "{0}.back" -f $CSShared
if (Test-Path -Path $CSShared) { if (Test-Path -Path $CSShared) {
Move-Item -Path $CSShared -Destination $BackupSharedFile Move-Item -Path $CSShared -Destination $BackupSharedFile
} }
Write-Verbose -Message 'Remove old CredentialStore in Temp dir' Write-Verbose "Remove old CredentialStore in Temp dir"
$CSTemp = Join-Path -Path (Get-TempDir) -ChildPath '/CredentialStore.json' $CSTemp = Join-Path -Path (Get-TempDir) -ChildPath '/CredentialStore.json'
if (Test-Path -Path $CSTemp) { if (Test-Path -Path $CSTemp) {
Remove-Item -Path $CSTemp Remove-Item -Path $CSTemp
} }
$VerbosePreference = 'SilentlyContinue' $VerbosePreference = "SilentlyContinue"
} }
Describe 'New-CredentialStoreItem' { Describe 'New-CredentialStoreItem' {
@ -109,8 +109,8 @@ Describe 'New-CredentialStoreItem' {
AfterAll { AfterAll {
# Cleanup test stores and restore existing ones. # Cleanup test stores and restore existing ones.
$VerbosePreference = 'Continue' $VerbosePreference = "Continue"
Write-Verbose -Message 'Restoring private CredentialStore' Write-Verbose "Restoring private CredentialStore"
If (Test-Path -Path $BackupFile) { If (Test-Path -Path $BackupFile) {
If (Test-Path -Path $CSPath) { If (Test-Path -Path $CSPath) {
Remove-Item -Path $CSPath Remove-Item -Path $CSPath
@ -118,13 +118,13 @@ AfterAll {
} }
} }
Write-Verbose -Message 'Restoring shared CredentialStore' Write-Verbose "Restoring shared CredentialStore"
If (Test-Path -Path $BackupSharedFile) { If (Test-Path -Path $BackupSharedFile) {
If (Test-Path -Path $CSShared) { If (Test-Path -Path $CSShared) {
Remove-Item -Path $CSShared Remove-Item -Path $CSShared
Move-Item -Path $BackupSharedFile -Destination $CSShared Move-Item -Path $BackupSharedFile -Destination $CSShared
} }
} }
$VerbosePreference = 'SilentlyContinue' $VerbosePreference = "SilentlyContinue"
} }

View File

@ -146,27 +146,27 @@
ExternalModuleDependencies = @( ExternalModuleDependencies = @(
@{ @{
ModuleName = 'VMware.VimAutomation.Core' ModuleName = 'VMware.VimAutomation.Core'
ModuleVersion = '12.7.0.20091293' ModuleVersion = '6.5.2.6234650'
}, },
@{ @{
ModuleName = 'VMware.VimAutomation.Cis.Core' ModuleName = 'VMware.VimAutomation.Cis.Core'
ModuleVersion = '12.6.0.19601368' ModuleVersion = '6.5.4.6983166'
}, },
@{ @{
ModuleName = 'Cisco.UCS.Common' ModuleName = 'Cisco.UCS.Core'
ModuleVersion = '3.0.1.2' ModuleVersion = '2.3.1.5'
}, },
@{ @{
ModuleName = 'Cisco.UCSManager' ModuleName = 'Cisco.UCSManager'
ModuleVersion = '3.0.1.2' ModuleVersion = '2.5.2.2'
}, },
@{ @{
ModuleName = 'WinSCP' ModuleName = 'WinSCP'
ModuleVersion = '5.17.8.1' ModuleVersion = '5.17.8.1'
}, },
@{ @{
ModuleName = 'NetApp.ONTAP' ModuleName = 'DataONTAP'
ModuleVersion = '9.10.1.2111' ModuleVersion = '9.7.1.1'
} }
) )

BIN
src/Vendor/libressl/openssl.exe (Stored with Git LFS) vendored

Binary file not shown.

BIN
src/Vendor/libressl255/libcrypto-41.dll (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libcrypto-41.exp (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libcrypto-41.lib (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libcrypto-41.pdb (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libssl-43.dll (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libssl-43.exp (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libssl-43.lib (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libssl-43.pdb (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libtls-15.dll (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libtls-15.exp (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libtls-15.lib (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/libtls-15.pdb (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/ocspcheck.exe (Stored with Git LFS) vendored Normal file

Binary file not shown.

BIN
src/Vendor/libressl255/openssl.exe (Stored with Git LFS) vendored Normal file

Binary file not shown.