Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .pipelines/EV2Specs/ServiceGroupRoot/Shell/Run/Run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#>

$env:NO_COLOR = 1
$PSStyle.OutputRendering = 'PlainText'

function Get-MappedRepositoryIds {
param(
Expand Down Expand Up @@ -102,12 +103,14 @@ function Get-PackageObjects {
$pkgRepo = $pkg.RepoId | Select-Object -First 1
$pkgDistribution = $pkg.Distribution | Select-Object -First 1

$pkgName = $pkg.PackageFormat.Replace('PACKAGE_NAME', $PackageName).Replace('RELEASE_VERSION', $ReleaseVersion)

if ($pkgName.EndsWith('.rpm')) {
$pkgName = $pkgName.Replace($ReleaseVersion, $ReleaseVersion.Replace('-', '_'))
$pkgReleaseVersion = $ReleaseVersion
if ($pkg.PackageFormat.EndsWith('.rpm')) {
# RPM requires no dashes in the version string, so replace any dashes with tildes
$pkgReleaseVersion = $pkgReleaseVersion.Replace('-', '~')
}

$pkgName = $pkg.PackageFormat.Replace('PACKAGE_NAME', $PackageName).Replace('RELEASE_VERSION', $pkgReleaseVersion)

$packagePath = "$script:dscPackagesFolder/$pkgName"
if (-not (Test-Path -Path $packagePath)) {
throw "Package path $packagePath does not exist"
Expand Down Expand Up @@ -277,7 +280,7 @@ try {
$skipPublish = $metadataContent.SkipPublish

$channel = if ($releaseVersion.Contains('-')) { 'preview' } else { 'stable' }
$packageName = $channel -eq 'preview' ? 'dsc-preview' : 'dsc'
$packageName = 'dsc'

Write-Verbose "Release version: $releaseVersion, Channel: $channel" -Verbose

Expand All @@ -297,7 +300,7 @@ try {
Write-Verbose "SkipPublish: $skipPublish" -Verbose
Publish-PackageToPMC -PackageObject $packageObjects -ConfigPath $configPath -SkipPublish $skipPublish
} catch {
Write-Error -ErrorAction Stop $_.Exception.Message
Write-Error -ErrorAction Stop (Get-Error | Out-String)
return 1
}
Comment on lines 302 to 305

Expand Down
8 changes: 4 additions & 4 deletions tools/packages.microsoft.com/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
"distribution": [
"stable"
],
"PackageFormat": "PACKAGE_NAME_RELEASE_VERSION-1_x86_64.rpm"
"PackageFormat": "PACKAGE_NAME-RELEASE_VERSION-1.x86_64.rpm"
},
{
"url": "microsoft-rhel9.0-prod",
"distribution": [
"stable"
],
"PackageFormat": "PACKAGE_NAME_RELEASE_VERSION-1_x86_64.rpm"
"PackageFormat": "PACKAGE_NAME-RELEASE_VERSION-1.x86_64.rpm"
},
{
"url": "microsoft-rhel8.0-prod",
"distribution": [
"stable"
],
"PackageFormat": "PACKAGE_NAME_RELEASE_VERSION-1_aarch64.rpm"
"PackageFormat": "PACKAGE_NAME-RELEASE_VERSION-1.aarch64.rpm"
},
{
"url": "microsoft-rhel9.0-prod",
"distribution": [
"stable"
],
"PackageFormat": "PACKAGE_NAME_RELEASE_VERSION-1_aarch64.rpm"
"PackageFormat": "PACKAGE_NAME-RELEASE_VERSION-1.aarch64.rpm"
},
{
"url": "microsoft-debian-bullseye-prod",
Expand Down
Loading