Skip to content

Commit 63ef04c

Browse files
Merge pull request #257 from chocolatey/nexusPin
Pin Nexus-Repository to mitigate upgrade issues
2 parents 19bf837 + b64e349 commit 63ef04c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Start-C4bNexusSetup.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ process {
3838
# Dot-source helper functions
3939
. .\scripts\Get-Helpers.ps1
4040

41+
$Packages = (Get-Content $PSScriptRoot\files\chocolatey.json | ConvertFrom-Json).packages
42+
4143
# Install base nexus-repository package
4244
Write-Host "Installing Sonatype Nexus Repository"
43-
$chocoArgs = @('install', 'nexus-repository', '-y' ,'--no-progress', "--package-parameters='/Fqdn:localhost'")
45+
$chocoArgs = @('install', 'nexus-repository', "--version=$($Packages.Where{$_.Name -eq 'nexus-repository'}.Version)", '--pin', '-y' ,'--no-progress', "--package-parameters='/Fqdn:localhost'")
4446
& choco @chocoArgs
4547

4648
#Build Credential Object, Connect to Nexus

files/chocolatey.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{ "name": "KB3035131", "internalize": false },
2525
{ "name": "KB3063858", "internalize": false },
2626
{ "name": "microsoft-edge" },
27-
{ "name": "nexus-repository" },
27+
{ "name": "nexus-repository", "version": "3.70.1.2" },
2828
{ "name": "sql-server-express" },
2929
{ "name": "temurin21jre" },
3030
{ "name": "vcredist140" }

0 commit comments

Comments
 (0)