Skip to content

Commit

Permalink
add_azure_core_repo: use bionic when the repo doesn't exist for newer…
Browse files Browse the repository at this point in the history
… distro version
  • Loading branch information
LiliDeng committed Feb 13, 2025
1 parent dbb4005 commit 60ad70d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lisa/operating_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -1345,6 +1345,12 @@ def add_azure_core_repo(
if not code_name:
code_name = self.information.codename
repo_url = "http://packages.microsoft.com/repos/azurecore/"

# Only certain code names are allowed for azurecore repo
allowed_code_names = ["bionic", "focal", "jammy", "trusty", "xenial"]
if code_name not in allowed_code_names:
code_name = "bionic"

self.add_repository(
repo=(f"deb [arch={arch_name}] {repo_url} {code_name} main"),
keys_location=[
Expand Down

0 comments on commit 60ad70d

Please sign in to comment.