Skip to content

Commit

Permalink
chore: fix workflow for automated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomiguelino committed Nov 5, 2024
1 parent 0f8a3a6 commit 0a15ebc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/Dockerfile.test.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ RUN cp ansible/roles/screenly/files/screenly.conf \
ENV GIT_HASH={{ git_hash }}
ENV GIT_SHORT_HASH={{ git_short_hash }}
ENV GIT_BRANCH={{ git_branch }}
ENV PATH="/opt/chrome-linux64:/opt/chromedriver-linux64:\$PATH"
ENV PATH="/opt/chrome-linux64:/opt/chromedriver-linux64:$PATH"
10 changes: 10 additions & 0 deletions tools/image_builder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def build_image(
docker_tags: list[str],
clean_build: bool,
push: bool,
dockerfiles_only: bool,
) -> None:
context = {}

Expand Down Expand Up @@ -355,6 +356,9 @@ def build_image(
click.secho(f'Skipping test service for {board}...', fg='yellow')
return

if dockerfiles_only:
return

docker.buildx.build(
context_path='.',
cache=(not clean_build),
Expand Down Expand Up @@ -408,13 +412,18 @@ def build_image(
'--push',
is_flag=True,
)
@click.option(
'--dockerfiles-only',
is_flag=True,
)
def main(
clean_build: bool,
build_target: str,
service,
disable_cache_mounts: bool,
environment: str,
push: bool,
dockerfiles_only: bool,
) -> None:
git_branch = pygit2.Repository('.').head.shorthand
git_hash = str(pygit2.Repository('.').head.target)
Expand Down Expand Up @@ -449,6 +458,7 @@ def main(
docker_tags,
clean_build,
push,
dockerfiles_only,
)


Expand Down

0 comments on commit 0a15ebc

Please sign in to comment.