1993 Commits

Author SHA1 Message Date
Tonis Tiigi
551b8f6785
git: do not show warnings if project does not use git
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-12-15 17:51:46 -08:00
Tõnis Tiigi
fbbe1c1b91
Merge pull request #1472 from crazy-max/ci-attest
ci: opt-in sbom and provenance
2022-12-15 17:38:13 -08:00
Tonis Tiigi
1a85745bf1
github: update buildkit image to v0.11-rc3
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-12-15 16:54:32 -08:00
CrazyMax
0d1fea8134
build: warn if git operation fails
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 23:40:19 +01:00
CrazyMax
19417e76e7
build: lookup the right git binary on WSL
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 21:16:37 +01:00
Tõnis Tiigi
53d88a79ef
Merge pull request #1475 from jedevc/attest-warn-duplicate
buildflags: error on duplicate attest field
2022-12-15 11:07:47 -08:00
Justin Chadwell
4c21b7e680
Merge pull request #1476 from jedevc/dont-filter-attestation-opts
build: forward all build opts everywhere
2022-12-15 19:05:39 +00:00
Justin Chadwell
a8f689c223 build: forward all build opts everywhere
All build options should be passed everywhere - the frontend and the
backend of buildkit should both be able to see all attestations, as well
as all other opts: e.g. epoch settings, and no-cache.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-15 18:19:47 +00:00
CrazyMax
ba8e3f9bc5
ci: generate provenance and sbom for bin image
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 19:12:26 +01:00
CrazyMax
477200d1f9
ci: generate provenance and sbom for release binaries
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 19:12:25 +01:00
Tõnis Tiigi
662738a7e5
Merge pull request #1474 from crazy-max/fix-ci
ci: fix warnings
2022-12-15 09:29:25 -08:00
Justin Chadwell
f992b77535 buildflags: warn on duplicate attest field
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-15 15:39:19 +00:00
CrazyMax
21b2f135b5
ci: update to ubuntu 22.04
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 14:34:03 +01:00
CrazyMax
71e6be5d99
ci: fix deprecated set-output syntax
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 14:24:02 +01:00
CrazyMax
df8e7d0a9a
Merge pull request #1473 from crazy-max/fix-docs-prerelease
ci: do not publish docs on prerelease
2022-12-15 14:22:07 +01:00
CrazyMax
64422a48d9
Merge pull request #1471 from crazy-max/fix-builder-factory
builder: check endpoint from store when loading factory
2022-12-15 14:19:20 +01:00
CrazyMax
04f9c62772
ci: do not publish docs on prerelease
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 14:16:45 +01:00
CrazyMax
2185d07f05
builder: check endpoint from store when loading factory
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-15 13:32:54 +01:00
CrazyMax
a49d28e00e
Merge pull request #1460 from crazy-max/docker-load
e2e: load to docker store
2022-12-15 10:35:29 +01:00
Tõnis Tiigi
629128c497
Merge pull request #1449 from crazy-max/bake-var-null
bake: support null arg and label value
2022-12-14 21:03:05 -08:00
Justin Chadwell
70682b043e build: refactor reference parsing for image layouts
We allow any valid image reference format for the oci-layout, not just
limiting to name@digest, we additionally allow images of the form
name:tag@digest now.

The name of the reference is used to find the local directory to lookup
the store in, while the tag and digest are attached to a random identity
to generate the dummy reference sent to the oci-layout context.

This separation of the target to replace and the value to replace it
with ensures that any tag or digest set in the client is properly sent
across to the server. The tag is used when a digest was not specified,
and it is resolved in the context of the local directory before being
sent, using the same helpers as we use for the local cache expoter.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-14 16:53:10 +00:00
Justin Chadwell
b741d26eb5
Merge pull request #1468 from crazy-max/fix-git-vcs-check
build: fix env vars check for vcs details
2022-12-14 12:51:29 +00:00
CrazyMax
cf8fa4a404
build: fix env vars check for vcs details
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-14 09:48:55 +01:00
CrazyMax
fe76a1b179
bake: support null label value
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-14 08:30:58 +01:00
CrazyMax
df4957307f
bake: support null arg value
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-14 08:29:27 +01:00
Tõnis Tiigi
e21f56e801
Merge pull request #1434 from jedevc/resource-interpolation
Resource interpolation support
v0.10.0-rc1
2022-12-13 18:06:51 -08:00
Justin Chadwell
e51b55e03c
bake: add tests for block interpolation
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-13 17:27:39 -08:00
Justin Chadwell
296b8249cb
bake: support block-based interpolation
This patch adds support for block-based interpolation, so that
properties of blocks can be referenced in the current block and across
other blocks.

Previously, order-of-evaluation did not matter for blocks, and could be
evaluated in any order. However, now that blocks can refer to each
other, we split out this dynamic evaluation order into a separate
resolveBlock function.

Additionally, we need to support partial block evaluations - if block A
refers to property X of block B, when we should only evaluate property
X, and not the entire block. This ensures that we can safely evaluate
blocks that refer to other properties within themselves, and allows
sequences that would otherwise be co-recursive. We take special care in
this logic to ensure that each property is evaluated once *and only*
once - this could otherwise present inconsistencies with stateful
functions, and could risk inconsistent results.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-13 17:27:39 -08:00
Justin Chadwell
7c6b840199
bake: add cty tags to hcl structures
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-13 17:27:36 -08:00
Tõnis Tiigi
2a6ff4cbfc
Merge pull request #1462 from crazy-max/attest-vcs
build: set provenance vcs details
2022-12-13 17:23:20 -08:00
CrazyMax
6ad5e2fcf3
build: set provenance vcs details
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-14 00:09:38 +01:00
Tõnis Tiigi
37811320ef
Merge pull request #1439 from crazy-max/last-activity
store: set nodegroup last activity
2022-12-13 15:00:47 -08:00
CrazyMax
99ac7f5f9e
e2e: load to docker store
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-13 23:32:58 +01:00
Tõnis Tiigi
96aca741a2
Merge pull request #1467 from tonistiigi/update-buildkit-862b22
vendor: update buildkit to 862b22d7
2022-12-13 12:07:42 -08:00
Tonis Tiigi
12ec931237
vendor: update buildkit to 862b22d7
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-12-13 12:00:06 -08:00
Justin Chadwell
0e293a4ec9
Merge pull request #1464 from jedevc/vendor-buildkit-93b40706a007
vendor: update buildkit to 93b40706a007
2022-12-13 11:12:54 +00:00
Justin Chadwell
163712a23b vendor: update buildkit to 93b40706a007
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-13 11:03:53 +00:00
Tõnis Tiigi
5f4d463780
Merge pull request #1435 from thaJeztah/bump_buildkit_v0.11
vendor: github.com/moby/buildkit v0.11.0-rc1.0.20221207183946-5993b526de65
2022-12-08 19:51:10 -08:00
Tõnis Tiigi
abc8121aa8
Merge pull request #1457 from jedevc/add-hosts-length-check
build: don't set add-hosts option if empty
2022-12-08 19:48:09 -08:00
CrazyMax
8c47277141
store: set nodegroup last activity
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-08 19:49:51 +01:00
CrazyMax
36b5cd18e8
store: use constants for directory names
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-08 19:35:55 +01:00
Justin Chadwell
1e72e32ec3
Merge pull request #1412 from jedevc/attestations-cli
Attestations from buildx
2022-12-08 17:30:31 +00:00
Sebastiaan van Stijn
8e5e5a563d
vendor: github.com/moby/buildkit v0.11.0-rc1.0.20221207183946-5993b526de65
- drops the replace-rule for github.com/aws/aws-sdk-go-v2/config (as it no longer was replacing anything)
- drops the replace-rules for docker/cli and docker/docker (at least as long as we continue using tagged releases)
- removes the github.com/docker/docker/pkg/stringid package (which was redundant)

full diff: 9624ab4710..5993b526de

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-12-07 23:27:29 +01:00
Justin Chadwell
98049e7eda build: don't set add-hosts option if empty
This looks like an oversight, all of the other options have similar
checks. This can interfere with generated provenance where "add-hosts"
will be marked as an argument to the build, even though it's not
actually being utilized.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-07 19:16:01 +00:00
Justin Chadwell
25aa893bad bake: add attests field
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-07 18:44:21 +00:00
Justin Chadwell
b270a20274 build: add attests flag and sbom/provenance shorthands
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-07 18:44:11 +00:00
Justin Chadwell
f0262dd10e build: add attestations to build options
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-07 18:43:36 +00:00
Justin Chadwell
f8b673eccd build: pass attestation attributes to build request
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-07 16:10:54 +00:00
Justin Chadwell
0c0c9a0030 chore: sort buildOptions alphabetically
Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-12-07 16:10:54 +00:00
CrazyMax
d1f79317cf
Merge pull request #1455 from crazy-max/nodegroup-exclude-field
store: skip DockerContext field from being saved
2022-12-07 16:07:30 +01:00