Commit graph

28 commits

Author SHA1 Message Date
Sas Swart
82c856094e
feat: add build secrets option ()
* feat: add build secrets option

* make gen and fix tests
2025-01-16 11:39:38 +02:00
Sas Swart
dabb7f31aa
chore(deps): upgrade the envbuilder and kaniko dependencies ()
* chore(deps): upgrade the envbuilder and kaniko dependencies

* make it build
2025-01-14 17:16:24 +02:00
Danielle Maywood
6795af2ba1
feat: support ENVBUILDER_GIT_SSH_PRIVATE_KEY_BASE64 () 2024-10-30 14:15:44 +00:00
Mathias Fredriksson
cdd57d3b36
chore(deps): update github.com/coder/envbuilder to v1.0.2 () 2024-10-02 14:45:15 +03:00
Cian Johnston
e565d7d145
fix: update envbuilder to include kaniko cache fix ()
* chore: add test for copy perms

* update kaniko and envbuilder to include fix

* add multi-stage version of copy perms test

* remove unnecessary chowns, collapse to single test

* update envbuilder and kaniko
2024-09-25 13:48:48 +01:00
Cian Johnston
4077a87dca
fix: set MagicDir to tempdir when performing cache probe ()
* fix: set MagicDir to tempdir when performing cache probe

* chore: update envbuilder to b7781d8

* imgutil: get default envbuilder binary path from envbuilder options
2024-09-10 09:47:39 +01:00
Cian Johnston
6137223cea
update kaniko to latest main to keep in sync with envbuilder () 2024-09-05 17:41:42 +01:00
Cian Johnston
482a446eb3
chore(internal/provider): refactor cached_image_resource ()
Addresses some non-blocking comments from :

- Extracts some of the functions in cached_image_resource.go to separate internal packages tfutil and imgutil.
- Some other functions are extracted to helpers.go.
- Extracts non-overridable flags to a package-level variable.
- Pre-allocates some slices where possible.
- Removes some unused code and renames some existing code for readability
2024-09-04 16:29:25 +01:00
Cian Johnston
23f2cf5f48
fix(internal/provider): correctly override from extra_env ()
Relates to 

Our previous logic did not pass options from extra_env to envbuilder.RunCacheProbe.
This fixes the logic and adds more comprehensive tests around the overriding logic.
Future commits will refactor this logic some more.
2024-09-04 11:19:25 +01:00
Cian Johnston
d6192fcd11
chore(docs): add provider schema () 2024-08-21 10:10:58 +01:00
Cian Johnston
cd1599f79d
fix(internal/provider): set all supported envbuilder options ()
* fix(internal/provider): set all supported envbuilder options

* do not allow overriding git_url and cache_repo
2024-08-16 14:55:46 +01:00
Cian Johnston
6cf3d93444
feat(internal/provider): add env_map to cached_image_resource ()
This PR adds `env_map` to `cached_image_resource.` This consists of the computed env in map format, which can be useful for other providers that do not expect `KEY=VALUE` format.
2024-08-16 09:42:27 +01:00
Cian Johnston
9f455838b8
fix(provider): correctly handle devcontainer-only in cache probe mode ()
* chore(internal/provider): add test case for dockerfile-only operation

* chore(deps): update envbuilder to include 
2024-08-15 12:58:06 +01:00
Cian Johnston
68cc59d705
fix(internal/provider): correct escaping of strings in envbuilder_cached_image.env ()
Fixes 

We had previously been doing the equivalent of value.String() when writing envbuilder_cached_image.env. This was incorrectly escaping newlines, potentially breaking ENVBUILDER_INIT_SCRIPT.

This PR modifies the behaviour to correctly handle string values via ValueString() instead.
2024-08-14 14:55:22 +01:00
Cian Johnston
b35004a702
feat: add warning diags to aid troubleshooting ()
Adds warning diagnostics to aid in troubleshooting issues with cached builds.
2024-08-13 13:13:45 +01:00
Cian Johnston
f8a49e84ff
ci: push envbuilder image to local registry () 2024-08-12 11:51:06 +01:00
Mathias Fredriksson
a2a5fcf79b
fix: prevent test flake by waiting on copy () 2024-08-12 12:54:30 +03:00
Cian Johnston
c10305910f
feat: add remote_repo_build_mode envbuilder option ()
Adds support for setting the --remote-repo-build-mode Envbuilder option. Defaults to true if not set.
2024-08-09 10:32:30 +01:00
Cian Johnston
d30006a40b
fix: do not quote stringy env variables () 2024-08-08 14:34:55 +01:00
Cian Johnston
72ddd72815
chore: pre-publish tidy ()
* chore: pre-publish tidy

* fixup! chore: pre-publish tidy

* update tf test matrix

* update envbuilder and kaniko fork to latest versions
2024-08-07 16:38:15 +01:00
Cian Johnston
ad8b1fda9e
feat: convert datasource to resource ()
- Convert datasource to resource
- Update examples
- Update tests
2024-08-07 11:49:41 +01:00
Mathias Fredriksson
77ba0fab6f
feat: add repo mode () 2024-08-05 17:35:12 +03:00
Cian Johnston
24b93e754d
chore: set TF_LOG=debug, always pull :latest envbuilder image () 2024-08-05 12:42:32 +01:00
Cian Johnston
88ad94f356
feat: extract envbuilder binary from builder image ()
- Adds workspace_folder parameter.
- Adds functionality to extract the envbuilder binary from the builder image.
- Drive-by: updates provider address.
2024-08-03 19:55:55 +01:00
Cian Johnston
c6d9bf5c27
update module path after being moved from mafredri org () 2024-08-01 23:11:40 +01:00
Cian Johnston
c9e7cb8178
implement first pass at cached image data source ()
implements envbuilder_cached_image data source
2024-08-01 21:26:44 +01:00
Mathias Fredriksson
1a49822fc9 Envbuilder 2024-07-22 17:15:50 +03:00
Mathias Fredriksson
76d8aa974e
Initial commit 2024-07-18 14:43:45 +03:00