Skip to content

Commit

Permalink
fix(flutter): Flutter builder caching being broken - part 2 (#319)
Browse files Browse the repository at this point in the history
* fix(cat-ci): Flutter broken CI cache

* fix(cat-ci): spelling

* fix(cat-ci): really fix the spelling

* fix(cat-ci): Make a test for building flutter-base in cat-ci.

* style(cat-ci): dedent the run lines for google chrome

* fix(cat-ci): env var definition and spelling
  • Loading branch information
stevenj authored Sep 28, 2024
1 parent d1857db commit 97be2e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions earthly/flutter/Earthfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
VERSION 0.8

# cspell: words noninteractive

IMPORT ./installer AS installer

# flutter-src save Flutter source code as artifact.
Expand All @@ -21,6 +23,8 @@ flutter-src:
flutter-base:
FROM debian:bookworm-20240513-slim

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update --fix-missing
RUN apt-get install -y apt-utils git curl gzip unzip bzip2 bash jq gpg lcov

Expand Down Expand Up @@ -49,6 +53,10 @@ flutter-base:
flutter-base-all-hosts:
BUILD --platform=linux/amd64 --platform=linux/arm64 +flutter-base

# Test that we can actually build the flutter base image.
build-flutter-base:
FROM +flutter-base

SETUP:
FUNCTION
FROM +flutter-base
Expand Down
4 changes: 2 additions & 2 deletions earthly/flutter/installer/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ INSTALL_CHROME_LINUX64:
&& dpkg -i /opt/chrome/chrome_amd64/*.deb || true \
&& rm -rf /opt/chrome.zip /opt/chrome \
&& mv /usr/bin/google-chrome-stable /usr/bin/google-chrome
RUN google-chrome --version
RUN google-chrome --version

RUN printf "${BLUE} Installing Chromedriver..." \
&& mkdir -p /opt/chromedriver \
&& curl -L "${BASE_URL}/chrome/chromedriver-linux64.zip" \
-o /opt/chromedriver/chromedriver.zip \
&& unzip -j /opt/chromedriver/chromedriver.zip -d /usr/local/bin/
RUN chromedriver --version
RUN chromedriver --version

ELSE
DO +INSTALL_CHROMIUM --PACKAGE_TYPE="chromium" --DOWNLOAD_URL="${BASE_URL}/chrome/chromium.zip"
Expand Down

0 comments on commit 97be2e4

Please sign in to comment.