Skip to content

Commit

Permalink
Fix linux package pipeline (#4192)
Browse files Browse the repository at this point in the history
* getting linux pacakging to work

* adding as env variable

* addign sudo

* script update

* remove sudo from python script

* changing cdn link
  • Loading branch information
aishwaryabh committed Nov 26, 2024
1 parent 448220b commit f50d404
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
1 change: 1 addition & 0 deletions eng/ci/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ trigger:
branches:
include:
- v4.x
- feature/oop-host

resources:
repositories:
Expand Down
14 changes: 9 additions & 5 deletions eng/ci/templates/official/jobs/linux-package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
jobs:
- job: LinuxPackage
condition: ne(variables['LinuxPackageBuildTag'], '')
condition: and(ne(variables['LinuxPackageBuildTag'], ''), ne(variables['ConsolidatedBuildId'], ''))
timeoutInMinutes: "120"
pool:
name: 1es-pool-azfunc
Expand All @@ -16,16 +16,20 @@ jobs:
cd publish-scripts
python3 -m venv publish-env
source publish-env/bin/activate
pip install -r requirements.txt
apt-get install fakeroot
pip install wget
sudo apt-get install fakeroot
major_version=$(echo "$linuxBuildNumber" | cut -d'.' -f1)
python driver.py "$linuxBuildNumber" "$major_version"
python driver.py "$linuxBuildNumber"
python driver.py "$linuxBuildNumber" "$consolidatedBuildId" "$major_version"
python driver.py "$linuxBuildNumber" "$consolidatedBuildId"
export DEB_PACKAGE="$(readlink -f artifact/*$RELEASE_VERSION*)"
echo "${DEB_PACKAGE}"
bashEnvValue: '~/.profile' # Set value for BASH_ENV environment variable
env:
linuxBuildNumber: $(LinuxPackageBuildTag)
linuxBuildNumber: $(LinuxPackageBuildTag)
consolidatedBuildId: $(ConsolidatedBuildId)
- pwsh: |
echo $env:LinuxPackageAccountName
$majorVersion = [math]::Floor([double]$env:LinuxPackageBuildTag.Split(".")[0])
Expand Down
2 changes: 1 addition & 1 deletion publish-scripts/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def main(*args):

print(f"args: {args} {len(args)}")
if (len(args) >= 4):
packageNamePostfix = "-" + args[2]
packageNamePostfix = "-" + args[3]

constants.PACKAGENAME = constants.PACKAGENAME + packageNamePostfix
print(f"constants.PACKAGENAME: {constants.PACKAGENAME}")
Expand Down
2 changes: 1 addition & 1 deletion publish-scripts/shared/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def linuxOutput(buildFolder):

# ubuntu dropped 64, fedora supports both
fileName = f"Azure.Functions.Cli.linux-x64.{constants.VERSION}.zip"
url = f'https://functionscdn.azureedge.net/public/{constants.VERSION}/{fileName}'
url = f'https://functionscdn.azureedge.net/public/4.0.{constants.CONSOLIDATED_BUILD_ID}/{fileName}'

# download the zip
# output to local folder
Expand Down

0 comments on commit f50d404

Please sign in to comment.