2
2
- job : LinuxPackage
3
3
condition : and(ne(variables['LinuxPackageBuildTag'], ''), ne(variables['ConsolidatedBuildId'], ''))
4
4
timeoutInMinutes : " 120"
5
+
5
6
pool :
6
7
name : 1es-pool-azfunc
7
8
image : 1es-ubuntu-22.04
8
9
os : linux
10
+
11
+ variables :
12
+ drop_path : $(Build.ArtifactStagingDirectory)
13
+ pkg_drop_path : $(drop_path)/drop_debian
14
+
15
+ templateContext :
16
+ outputParentDirectory : $(drop_path)
17
+ outputs :
18
+ - output : pipelineArtifact
19
+ displayName : Publish debian package
20
+ path : $(pkg_drop_path)
21
+ artifact : drop_debian
22
+
9
23
steps :
10
- # Bash v3
11
- # Run a Bash script on macOS, Linux, or Windows.
12
24
- task : Bash@3
25
+ displayName : ' Build DEB package'
13
26
inputs :
14
- targetType : ' inline' # Specify 'filePath' if you want to use an external script file.
27
+ targetType : ' inline'
15
28
script : |
16
29
cd publish-scripts
17
30
python3 -m venv publish-env
@@ -29,33 +42,40 @@ jobs:
29
42
bashEnvValue : ' ~/.profile' # Set value for BASH_ENV environment variable
30
43
env :
31
44
linuxBuildNumber : $(LinuxPackageBuildTag)
32
- consolidatedBuildId : $(ConsolidatedBuildId)
45
+ consolidatedBuildId : $(ConsolidatedBuildId)
46
+
33
47
- pwsh : |
34
- echo $env:LinuxPackageAccountName
35
48
$majorVersion = [math]::Floor([double]$env:LinuxPackageBuildTag.Split(".")[0])
49
+ echo $env:LinuxPackageBuildTag
50
+ echo $majorVersion
51
+
36
52
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
37
53
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
38
54
env:
39
55
LinuxPackageAccountName: $(LinuxPackageAccountName)
40
56
LinuxPackageAccountKey: $(LinuxPackageAccountKey)
41
57
LinuxPackageBuildTag: $(LinuxPackageBuildTag)
42
58
displayName: 'Upload Core Tools Unsigned Linux Package to the storage'
43
- - template : ci/sign-files.yml@eng
44
- parameters :
45
- displayName : ' Sign'
46
- folderPath : ' /mnt/vss/_work/1/s/publish-scripts/artifact'
47
- pattern : ' *.deb'
48
- signType : inline
49
- inlineOperation : |
50
- [
51
- {
52
- "keyCode": "CP-450779-Pgp",
53
- "operationSetCode": "LinuxSign",
54
- "parameters": [],
55
- "toolName": "signtool.exe",
56
- "toolVersion": "1.0"
57
- }
58
- ]
59
+ condition: eq(variables['BuildOnly'], 'false')
60
+
61
+ - ${{ if eq(variables.BuildOnly, false) }} :
62
+ - template : ci/sign-files.yml@eng
63
+ parameters :
64
+ displayName : ' Sign'
65
+ folderPath : ' /mnt/vss/_work/1/s/publish-scripts/artifact'
66
+ pattern : ' *.deb'
67
+ signType : inline
68
+ inlineOperation : |
69
+ [
70
+ {
71
+ "keyCode": "CP-450779-Pgp",
72
+ "operationSetCode": "LinuxSign",
73
+ "parameters": [],
74
+ "toolName": "signtool.exe",
75
+ "toolVersion": "1.0"
76
+ }
77
+ ]
78
+
59
79
- pwsh : |
60
80
echo $env:LinuxPackageAccountName
61
81
$majorVersion = [math]::Floor([double]$env:LinuxPackageBuildTag.Split(".")[0])
66
86
LinuxPackageAccountKey: $(LinuxPackageAccountKey)
67
87
LinuxPackageBuildTag: $(LinuxPackageBuildTag)
68
88
displayName: 'Upload Core Tools Signed Linux Package to the storage'
89
+ condition: eq(variables['BuildOnly'], 'false')
90
+
91
+ - task : Bash@3
92
+ displayName : ' Copy DEB package to drop'
93
+ inputs :
94
+ targetType : ' inline'
95
+ script : |
96
+ mkdir -p $drop
97
+ cp -r /mnt/vss/_work/1/s/publish-scripts/artifact/* $drop
98
+ env :
99
+ drop : $(pkg_drop_path)
0 commit comments