Skip to content

Commit

Permalink
fix: make the base image parameter dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomiguelino committed Nov 1, 2024
1 parent 05e514f commit 350bb34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/image_builder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def build_image(
git_short_hash: str,
git_branch: str,
environment: str,
base_image: str,
) -> None:
context = {}

Expand Down Expand Up @@ -288,7 +289,7 @@ def build_image(
)
except StopIteration:
click.secho('No wifi-connect release found for this architecture.', fg='red')
return
archive_url = ""

except requests.exceptions.RequestException as e:
click.secho(f'Failed to get wifi-connect release: {e}', fg='red')
Expand All @@ -311,7 +312,7 @@ def build_image(
})

generate_dockerfile(service, {
'base_image': 'balenalib/raspberrypi3-debian',
'base_image': base_image,
'base_image_tag': 'bookworm',
'base_apt_dependencies': base_apt_dependencies,
'board': board,
Expand Down Expand Up @@ -366,6 +367,7 @@ def main(
build_parameters = get_build_parameters(build_target)
board = build_parameters['board']
target_platform = build_parameters['target_platform']
base_image = build_parameters['base_image']

docker_tag = get_docker_tag(git_branch, board)

Expand All @@ -381,6 +383,7 @@ def main(
git_short_hash,
git_branch,
environment,
base_image,
)


Expand Down

0 comments on commit 350bb34

Please sign in to comment.