Skip to content

Commit

Permalink
Merge pull request #257 from chocolatey/nexusPin
Browse files Browse the repository at this point in the history
Pin Nexus-Repository to mitigate upgrade issues
  • Loading branch information
ryanrichter94 authored Aug 12, 2024
2 parents 19bf837 + b64e349 commit 63ef04c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Start-C4bNexusSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ process {
# Dot-source helper functions
. .\scripts\Get-Helpers.ps1

$Packages = (Get-Content $PSScriptRoot\files\chocolatey.json | ConvertFrom-Json).packages

# Install base nexus-repository package
Write-Host "Installing Sonatype Nexus Repository"
$chocoArgs = @('install', 'nexus-repository', '-y' ,'--no-progress', "--package-parameters='/Fqdn:localhost'")
$chocoArgs = @('install', 'nexus-repository', "--version=$($Packages.Where{$_.Name -eq 'nexus-repository'}.Version)", '--pin', '-y' ,'--no-progress', "--package-parameters='/Fqdn:localhost'")
& choco @chocoArgs

#Build Credential Object, Connect to Nexus
Expand Down
2 changes: 1 addition & 1 deletion files/chocolatey.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{ "name": "KB3035131", "internalize": false },
{ "name": "KB3063858", "internalize": false },
{ "name": "microsoft-edge" },
{ "name": "nexus-repository" },
{ "name": "nexus-repository", "version": "3.70.1.2" },
{ "name": "sql-server-express" },
{ "name": "temurin21jre" },
{ "name": "vcredist140" }
Expand Down

0 comments on commit 63ef04c

Please sign in to comment.