Skip to content

Commit 131bc50

Browse files
authored
Removed unused username/password parameters (#9844)
1 parent 0587485 commit 131bc50

8 files changed

Lines changed: 8 additions & 44 deletions

File tree

src/AccountDeleter/Scripts/Functions.ps1

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Function Install-NuGetService() {
1616
Param (
1717
[string]$ServiceName,
1818
[string]$ServiceTitle,
19-
[string]$ScriptToRun,
20-
[Parameter(Mandatory=$false)][string]$Username,
21-
[Parameter(Mandatory=$false)][string]$Password
19+
[string]$ScriptToRun
2220
)
2321

2422
Write-Host Installing service $ServiceName...
@@ -29,11 +27,6 @@ Function Install-NuGetService() {
2927
Set-Service -Name $ServiceName -DisplayName "$ServiceTitle - $ServiceName" -Description "Runs $ServiceTitle." -StartupType Automatic
3028
sc.exe failure $ServiceName reset= 30 actions= restart/5000
3129

32-
if ($Username) {
33-
Write-Host Running service under specific credentials.
34-
sc.exe config "$ServiceName" obj= "$Username" password= "$Password"
35-
}
36-
3730
# Run service
3831
net start $ServiceName
3932

src/AccountDeleter/Scripts/PostDeploy.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ $currentDirectory = [string](Get-Location)
99
$jobsToInstall.Split("{;}") | %{
1010
$serviceName = $_
1111
$serviceTitle = $OctopusParameters["Jobs.$serviceName.Title"]
12-
$serviceUsername = $OctopusParameters["Jobs.$serviceName.Username"]
13-
$servicePassword = $OctopusParameters["Jobs.$serviceName.Password"]
1412
$scriptToRun = $OctopusParameters["Jobs.$serviceName.Script"]
1513
$scriptToRun = "$currentDirectory\$scriptToRun"
1614

17-
Install-NuGetService -ServiceName $serviceName -ServiceTitle $serviceTitle -ScriptToRun $scriptToRun -Username $serviceUsername -Password $servicePassword
15+
Install-NuGetService -ServiceName $serviceName -ServiceTitle $serviceTitle -ScriptToRun $scriptToRun
1816
}
1917

2018
Write-Host Installed services.

src/GitHubVulnerabilities2Db/Scripts/Functions.ps1

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Function Install-NuGetService() {
1616
Param (
1717
[string]$ServiceName,
1818
[string]$ServiceTitle,
19-
[string]$ScriptToRun,
20-
[Parameter(Mandatory=$false)][string]$Username,
21-
[Parameter(Mandatory=$false)][string]$Password
19+
[string]$ScriptToRun
2220
)
2321

2422
Write-Host Installing service $ServiceName...
@@ -29,11 +27,6 @@ Function Install-NuGetService() {
2927
Set-Service -Name $ServiceName -DisplayName "$ServiceTitle - $ServiceName" -Description "Runs $ServiceTitle." -StartupType Automatic
3028
sc.exe failure $ServiceName reset= 30 actions= restart/5000
3129

32-
if ($Username) {
33-
Write-Host Running service under specific credentials.
34-
sc.exe config "$ServiceName" obj= "$Username" password= "$Password"
35-
}
36-
3730
# Run service
3831
net start $ServiceName
3932

src/GitHubVulnerabilities2Db/Scripts/PostDeploy.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ $currentDirectory = [string](Get-Location)
99
$jobsToInstall.Split("{;}") | %{
1010
$serviceName = $_
1111
$serviceTitle = $OctopusParameters["Jobs.$serviceName.Title"]
12-
$serviceUsername = $OctopusParameters["Jobs.$serviceName.Username"]
13-
$servicePassword = $OctopusParameters["Jobs.$serviceName.Password"]
1412
$scriptToRun = $OctopusParameters["Jobs.$serviceName.Script"]
1513
$scriptToRun = "$currentDirectory\$scriptToRun"
1614

17-
Install-NuGetService -ServiceName $serviceName -ServiceTitle $serviceTitle -ScriptToRun $scriptToRun -Username $serviceUsername -Password $servicePassword
15+
Install-NuGetService -ServiceName $serviceName -ServiceTitle $serviceTitle -ScriptToRun $scriptToRun
1816
}
1917

2018
Write-Host Installed services.

src/GitHubVulnerabilities2v3/Scripts/Functions.ps1

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Function Install-NuGetService() {
1616
Param (
1717
[string]$ServiceName,
1818
[string]$ServiceTitle,
19-
[string]$ScriptToRun,
20-
[Parameter(Mandatory=$false)][string]$Username,
21-
[Parameter(Mandatory=$false)][string]$Password
19+
[string]$ScriptToRun
2220
)
2321

2422
Write-Host Installing service $ServiceName...
@@ -29,11 +27,6 @@ Function Install-NuGetService() {
2927
Set-Service -Name $ServiceName -DisplayName "$ServiceTitle - $ServiceName" -Description "Runs $ServiceTitle." -StartupType Automatic
3028
sc.exe failure $ServiceName reset= 30 actions= restart/5000
3129

32-
if ($Username) {
33-
Write-Host Running service under specific credentials.
34-
sc.exe config "$ServiceName" obj= "$Username" password= "$Password"
35-
}
36-
3730
# Run service
3831
net start $ServiceName
3932

src/GitHubVulnerabilities2v3/Scripts/PostDeploy.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ $currentDirectory = [string](Get-Location)
99
$jobsToInstall.Split("{;}") | %{
1010
$serviceName = $_
1111
$serviceTitle = $OctopusParameters["Jobs.$serviceName.Title"]
12-
$serviceUsername = $OctopusParameters["Jobs.$serviceName.Username"]
13-
$servicePassword = $OctopusParameters["Jobs.$serviceName.Password"]
1412
$scriptToRun = $OctopusParameters["Jobs.$serviceName.Script"]
1513
$scriptToRun = "$currentDirectory\$scriptToRun"
1614

17-
Install-NuGetService -ServiceName $serviceName -ServiceTitle $serviceTitle -ScriptToRun $scriptToRun -Username $serviceUsername -Password $servicePassword
15+
Install-NuGetService -ServiceName $serviceName -ServiceTitle $serviceTitle -ScriptToRun $scriptToRun
1816
}
1917

2018
Write-Host Installed services.

src/VerifyGitHubVulnerabilities/Scripts/Functions.ps1

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ Function Install-NuGetService() {
1616
Param (
1717
[string]$ServiceName,
1818
[string]$ServiceTitle,
19-
[string]$ScriptToRun,
20-
[Parameter(Mandatory=$false)][string]$Username,
21-
[Parameter(Mandatory=$false)][string]$Password
19+
[string]$ScriptToRun
2220
)
2321

2422
Write-Host Installing service $ServiceName...
@@ -29,11 +27,6 @@ Function Install-NuGetService() {
2927
Set-Service -Name $ServiceName -DisplayName "$ServiceTitle - $ServiceName" -Description "Runs $ServiceTitle." -StartupType Automatic
3028
sc.exe failure $ServiceName reset= 30 actions= restart/5000
3129

32-
if ($Username) {
33-
Write-Host Running service under specific credentials.
34-
sc.exe config "$ServiceName" obj= "$Username" password= "$Password"
35-
}
36-
3730
# Run service
3831
net start $ServiceName
3932

src/VerifyGitHubVulnerabilities/Scripts/PostDeploy.ps1

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ $currentDirectory = [string](Get-Location)
99
$jobsToInstall.Split("{;}") | %{
1010
$serviceName = $_
1111
$serviceTitle = $OctopusParameters["Jobs.$serviceName.Title"]
12-
$serviceUsername = $OctopusParameters["Jobs.$serviceName.Username"]
13-
$servicePassword = $OctopusParameters["Jobs.$serviceName.Password"]
1412
$scriptToRun = $OctopusParameters["Jobs.$serviceName.Script"]
1513
$scriptToRun = "$currentDirectory\$scriptToRun"
1614

17-
Install-NuGetService -ServiceName $serviceName -ServiceTitle $serviceTitle -ScriptToRun $scriptToRun -Username $serviceUsername -Password $servicePassword
15+
Install-NuGetService -ServiceName $serviceName -ServiceTitle $serviceTitle -ScriptToRun $scriptToRun
1816
}
1917

2018
Write-Host Installed services.

0 commit comments

Comments
 (0)