-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bundle platformio lib_deps in docker images (#1625)
- Loading branch information
1 parent
60b2d57
commit 5eeb110
Showing
12 changed files
with
61 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM esphome/esphome-base-amd64:2.6.0 | ||
FROM esphome/esphome-base-amd64:2.8.0 | ||
|
||
COPY . . | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
FROM esphome/esphome-lint-base:2.6.0 | ||
FROM esphome/esphome-lint-base:2.8.0 | ||
|
||
COPY requirements.txt requirements_test.txt / | ||
RUN pip3 install --no-cache-dir -r /requirements.txt -r /requirements_test.txt | ||
COPY requirements.txt requirements_test.txt docker/platformio_install_deps.py platformio.ini / | ||
RUN \ | ||
pip3 install --no-cache-dir -r /requirements.txt -r /requirements_test.txt \ | ||
&& /platformio_install_deps.py /platformio.ini | ||
|
||
VOLUME ["/esphome"] | ||
WORKDIR /esphome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env python3 | ||
# This script is used in the docker containers to preinstall | ||
# all platformio libraries in the global storage | ||
|
||
import configparser | ||
import re | ||
import subprocess | ||
import sys | ||
|
||
config = configparser.ConfigParser() | ||
config.read(sys.argv[1]) | ||
libs = [] | ||
for line in config['common']['lib_deps'].splitlines(): | ||
# Format: '1655@1.0.2 ; TinyGPSPlus (has name conflict)' (includes comment) | ||
m = re.search(r'([a-zA-Z0-9-_/]+@[0-9\.]+)', line) | ||
if m is None: | ||
continue | ||
libs.append(m.group(1)) | ||
|
||
subprocess.check_call(['platformio', 'lib', '-g', 'install', *libs]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters