Skip to content

Commit

Permalink
Add the option to skip the pkg upload and signing in the linux build …
Browse files Browse the repository at this point in the history
…pipeline
  • Loading branch information
liliankasem committed Feb 5, 2025
1 parent 97ebfe4 commit 2e77905
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
3 changes: 1 addition & 2 deletions eng/ci/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ extends:
name: 1es-pool-azfunc
image: 1es-windows-2022
os: windows
stages:
stages:
- stage: BuildAndTest
jobs:
- template: /eng/ci/templates/official/jobs/linux-package.yml@self

15 changes: 13 additions & 2 deletions eng/ci/templates/official/jobs/linux-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ jobs:
- job: LinuxPackage
condition: and(ne(variables['LinuxPackageBuildTag'], ''), ne(variables['ConsolidatedBuildId'], ''))
timeoutInMinutes: "120"

pool:
name: 1es-pool-azfunc
image: 1es-ubuntu-22.04
os: linux

steps:
# Bash v3
# Run a Bash script on macOS, Linux, or Windows.
- task: Bash@3
displayName: 'Build DEB package'
inputs:
targetType: 'inline' # Specify 'filePath' if you want to use an external script file.
script: |
Expand All @@ -29,17 +32,22 @@ jobs:
bashEnvValue: '~/.profile' # Set value for BASH_ENV environment variable
env:
linuxBuildNumber: $(LinuxPackageBuildTag)
consolidatedBuildId: $(ConsolidatedBuildId)
consolidatedBuildId: $(ConsolidatedBuildId)

- pwsh: |
echo $env:LinuxPackageAccountName
$majorVersion = [math]::Floor([double]$env:LinuxPackageBuildTag.Split(".")[0])
echo $env:LinuxPackageBuildTag
echo $majorVersion
az storage blob upload -f /mnt/vss/_work/1/s/publish-scripts/artifact/azure-functions-core-tools_$env:LinuxPackageBuildTag-1.deb -c unsigned -n azure-functions-core-tools_$env:LinuxPackageBuildTag-1.deb --account-name $env:LinuxPackageAccountName --account-key $env:LinuxPackageAccountKey
az storage blob upload -f /mnt/vss/_work/1/s/publish-scripts/artifact/azure-functions-core-tools-$($majorVersion)_$env:LinuxPackageBuildTag-1.deb -c unsigned -n azure-functions-core-tools-$($majorVersion)_$env:LinuxPackageBuildTag-1.deb --account-name $env:LinuxPackageAccountName --account-key $env:LinuxPackageAccountKey
env:
LinuxPackageAccountName: $(LinuxPackageAccountName)
LinuxPackageAccountKey: $(LinuxPackageAccountKey)
LinuxPackageBuildTag: $(LinuxPackageBuildTag)
displayName: 'Upload Core Tools Unsigned Linux Package to the storage'
condition: eq(variables['BuildOnly'], 'false')
- template: ci/sign-files.yml@eng
parameters:
displayName: 'Sign'
Expand All @@ -56,6 +64,8 @@ jobs:
"toolVersion": "1.0"
}
]
condition: eq(variables['BuildOnly'], 'false')

- pwsh: |
echo $env:LinuxPackageAccountName
$majorVersion = [math]::Floor([double]$env:LinuxPackageBuildTag.Split(".")[0])
Expand All @@ -66,3 +76,4 @@ jobs:
LinuxPackageAccountKey: $(LinuxPackageAccountKey)
LinuxPackageBuildTag: $(LinuxPackageBuildTag)
displayName: 'Upload Core Tools Signed Linux Package to the storage'
condition: eq(variables['BuildOnly'], 'false')

0 comments on commit 2e77905

Please sign in to comment.