CrazyMax
1e1cc940df
bake: fix print output
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
(cherry picked from commit 316ca972b6a6ce4e2fe4b422097579b7e6ae0f8e)
2021-11-25 09:29:58 +01:00
CrazyMax
82b212bddf
bake: fix protocol detection
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-02 23:12:27 +01:00
Tonis Tiigi
7a7b73c043
bake: restore previous override merge behavior
...
For array fields, overrides are merged together
but override is not merged with the target. If merging
with target is desired we can add support for
overrides with += operator in the future.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-29 08:27:27 -07:00
Tonis Tiigi
0e4d7aa7a9
bake: add test for merging overrides
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-28 23:21:07 -07:00
Tonis Tiigi
6fc906532b
bake: fix using push override with output definition
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-09-20 16:22:27 -07:00
Tonis Tiigi
422ba60b04
use long-running context for client initialization
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-08-19 20:36:24 -07:00
Tõnis Tiigi
cb185f095f
Merge pull request #721 from crazy-max/compose-ext
...
bake: `x-bake` extension field with compose
2021-08-13 07:51:23 -07:00
CrazyMax
89e126fa60
bake: x-bake
extension field with compose
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-08-13 09:15:15 +02:00
CrazyMax
c685e46609
bake: print default group
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-08-12 09:02:36 +02:00
CrazyMax
9aa8f09f14
Set ConfigFile
to parse compose files with bake
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-07-30 17:56:40 +02:00
Tonis Tiigi
1bb425a882
bake: allow BAKE_CMD_CONTEXT builtin var
...
Allows accessing the main context for bake command from bake
file that has been imported remotely.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-12 21:01:41 -07:00
CrazyMax
ba443811e4
Use compose-spec parser
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-07-12 11:21:04 +02:00
Tonis Tiigi
79433cef7a
bake: fix target merge between compose and hcl
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-24 22:40:32 -07:00
Tonis Tiigi
c5eb8f58b4
bake: new hclparser package
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-06-24 22:40:25 -07:00
Tõnis Tiigi
03b7128b60
Merge pull request #575 from tonistiigi/user-func-vars
...
bake: allow user functions in variables and vice-versa
2021-06-23 11:08:56 -07:00
Tonis Tiigi
df7a318ec0
bake: allow user functions in variables and vice-versa
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-05-05 22:08:31 -07:00
Akihiro Suda
399df854ea
build: split buildflags package
...
Planned to be imported by nerdctl in future.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-12 14:36:56 +09:00
Alex Couture-Beil
eec843a325
include default ssh socket when given an ssh-based git url
...
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2021-04-01 11:25:18 -07:00
Tonis Tiigi
83868a48b7
temp local copy of userfunc
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-26 17:06:38 -07:00
Tonis Tiigi
f036bba48c
bake: add test for json vars and attributes
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-25 11:00:17 -07:00
Tonis Tiigi
0fe2ce7fac
bake: allow attributes in global scope
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-25 11:00:17 -07:00
Tonis Tiigi
33f25acb08
bake: allow variables to reference each other
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-07 21:27:30 -08:00
Tonis Tiigi
0e9066f6ed
bake: fix hcl tests layout
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-01 12:08:09 -08:00
Tonis Tiigi
0e9d6460db
bake: allow variables across files
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-25 16:30:27 -08:00
Tonis Tiigi
dba79ba223
update lint to go1.16/golangci
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-16 23:43:06 -08:00
Tonis Tiigi
7878f0c514
bake: allow variables in user functions
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-04 23:27:09 -08:00
Felipe Santos
f1f464e364
Add setproduct function to the bake HCL
...
As explained in the following link, it's a very useful function.
https://www.terraform.io/docs/configuration/functions/setproduct.html#finding-combinations-for-for_each
Signed-off-by: Felipe Santos <felipecassiors@gmail.com>
2021-01-10 06:11:14 +00:00
CrazyMax
96e7f3224a
Extend hcl2 support with more functions
...
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2020-12-23 12:33:55 +01:00
Tonis Tiigi
40fad4bbb5
progress: make sure all channels have written before returning
...
Possible write on closed channel on cancellation before.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-07 22:02:51 -08:00
Tonis Tiigi
5bf2ff98c9
bake: support filenames without suffix
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-07 22:02:51 -08:00
Tonis Tiigi
570e733a51
bake: support inline dockerfile
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-07 22:02:51 -08:00
Tonis Tiigi
cffcd57edb
bake: support for remote files
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-07 22:02:51 -08:00
Anthony Poschen
abfb2c064d
Add support for empty strings in target elements and compact func.
...
Signed-off-by: Anthony Poschen <zanven42@gmail.com>
2020-10-26 15:56:18 +11:00
Tonis Tiigi
95ac9ebb8a
bake: format hcl errors with source definition
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-09-19 22:50:47 -07:00
Tõnis Tiigi
42448c5f37
Merge pull request #280 from vanstee/hcl-json-support
...
Support parsing json config with hcl v2
2020-05-08 09:25:25 -07:00
Patrick Van Stee
355261e49e
Parse bake config as hcl falling back to json
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-05-07 23:53:49 -04:00
Patrick Van Stee
44c840b31d
Add test of parsing a json bake config
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-05-07 23:53:49 -04:00
Patrick Van Stee
1bc068a583
Fix json keys for groups and targets
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-05-07 23:53:49 -04:00
Patrick Van Stee
340686a383
Support parsing json config with hcl v2
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-05-07 23:53:49 -04:00
Brian Goff
1ad87c6ba6
Update go-cty to pull in more stdlib funcs.
...
I needed "split" specifically so I can do something like:
```hcl
variable PLATFORMS {
default = "linux/amd64"
}
target foo {
platforms = split(",", "${PLATFORMS}")
# other stuff
}
```
Where the existing "csvdecode" does not work for this because it parses
the string into a list of objects instead of a list of strings.
I went ahead and just added all the available new functions.
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-05-07 16:05:17 -07:00
Tibor Vass
77ddee9314
bake: fix pull and no-cache overrides
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-30 14:05:21 -07:00
Tonis Tiigi
c9676c79d1
bake: fix hcl tags
...
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-30 13:41:49 -07:00
Patrick Van Stee
870b38837b
Allow for user defined functions
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-04-29 08:52:48 -04:00
Patrick Van Stee
abed97cf33
Include test cases of different hcl files
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-04-29 08:51:26 -04:00
Patrick Van Stee
f10d8dab5e
Define variables as blocks with defaults
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-04-29 08:51:26 -04:00
Patrick Van Stee
5185d534bc
Include go-cty stdlib functions in HCL file scope
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-04-29 08:51:26 -04:00
Patrick Van Stee
a520de447e
Provide current env as variables in eval context
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-04-29 08:51:26 -04:00
Patrick Van Stee
4121ae50b5
Modify parsing functions and config structs to accept hcl changes
...
Signed-off-by: Patrick Van Stee <patrick@vanstee.me>
2020-04-29 08:51:26 -04:00
Tibor Vass
2a257a8252
bake: allow overriding no-cache and pull per target via --set
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-23 18:11:22 +00:00
Tibor Vass
078b65905a
bake: add test cases for pattern matching
...
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-23 05:54:11 +00:00