-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): pre-fetch provider tools and make tools a native feature
This adds the notion of tools to the plugin framework, and a command to allow using and pre-fetching these tools. The primary motivation was to allow pre-fetching the tools as part of our container builds, as well as to make it easy for users to do the same in their custom CI setups with Garden. The `garden tools` command is also handy since it allows users to easily use the exact same tools as Garden's providers fetch and use. To pre-fetch the tools, we add a `garden util fetch-tools` command, which fetches all tools for the configured providers in the current project, or for all registered providers if the `--all` flag is set. Notes: - We now always fetch the docker binary on use, instead of checking for its existence locally. This avoids some code complexity and makes sure we always use the expected version. The downside should be mitigated by the pre-fetching in built containers, and the fetch-tools command. - We really need to reduce the number of tools and versions we bundle before we release 0.12. The container image sizes are too large atm.
- Loading branch information
Showing
80 changed files
with
2,119 additions
and
886 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,17 +11,17 @@ RUN apk add --no-cache \ | |
|
||
WORKDIR /tmp | ||
|
||
RUN npm install [email protected].2 && node_modules/.bin/pkg-fetch node12 alpine x64 | ||
RUN npm install [email protected].8 && node_modules/.bin/pkg-fetch node12 alpine x64 | ||
|
||
ADD package.json /tmp/ | ||
ADD package-lock.json /tmp/ | ||
|
||
RUN npm install \ | ||
&& rm -rf /root/.npm/* \ | ||
/usr/lib/node_modules/npm/man/* \ | ||
/usr/lib/node_modules/npm/doc/* \ | ||
/usr/lib/node_modules/npm/html/* \ | ||
/usr/lib/node_modules/npm/scripts/* | ||
/usr/lib/node_modules/npm/man/* \ | ||
/usr/lib/node_modules/npm/doc/* \ | ||
/usr/lib/node_modules/npm/html/* \ | ||
/usr/lib/node_modules/npm/scripts/* | ||
|
||
ADD bin/garden /tmp/bin/garden | ||
ADD bin/garden-debug /tmp/bin/garden-debug | ||
|
@@ -56,6 +56,7 @@ WORKDIR /project | |
|
||
RUN chmod +x /garden/garden \ | ||
&& ln -s /garden/garden /bin/garden \ | ||
&& chmod +x /bin/garden | ||
&& chmod +x /bin/garden \ | ||
&& cd /garden/static && garden util fetch-tools --all --logger-type=basic | ||
|
||
ENTRYPOINT ["/garden/garden"] |
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
Oops, something went wrong.