Commit Graph

1272 Commits (78d8b926db63c4a4bbd48dc185f96ec6bc0bf677)
 

Author SHA1 Message Date
Justin Chadwell 78d8b926db inspect: lazily load attestation data
Delay loading the attestation data immediately, and only compute it upon
request. We do this using a deferred function which allows to define the
computation in the same place as before, but perform the computation
later.

With this patch, we ensure that the attestation data is only pulled from
the remote if it is actually referenced in the format string -
otherwise, we can skip it, for improved performance.

Signed-off-by: Justin Chadwell <me@jedevc.com>
Justin Chadwell 19291d900e inspect: move attestation loading to struct methods
This refactor ensures that the attestations are not output in the JSON
output for "{{ json . }}", and additionally allows future refactors to
dynamically load the attestation contents, ensuring faster performance
when attestations are not used in the output.

Signed-off-by: Justin Chadwell <me@jedevc.com>
Tõnis Tiigi b7781447d7
Merge pull request from thaJeztah/0.10_backport_update_buildkit
[0.10 backport] vendor: github.com/moby/buildkit v0.11.1
Sebastiaan van Stijn f6ba0a23f8
vendor: github.com/moby/buildkit v0.11.1
full diff: https://github.com/moby/buildkit/compare/v0.11.0...v0.11.1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 01e1c28dd9)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
CrazyMax bf4b95fc3a
Merge pull request from jedevc/v0.10-docs-reference-attest
[0.10] docs: add reference for new attest family of flags
Justin Chadwell 467586dc8d docs: add reference for new attest family of flags
Signed-off-by: Justin Chadwell <me@jedevc.com>
Tõnis Tiigi 8764628976
Merge pull request from tonistiigi/v0.10-picks
[v0.10] cherry-picks
Justin Chadwell 583fe71740
docs: update with new inspect output
Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit 9818055b0e)
Justin Chadwell 9fb3ff1a27
inspect: change additional spdxs to not have duplicates
Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit 484823c97d)
Justin Chadwell 9d4f38c5fa
inspect: provide access to multiple spdx documents
Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit 3ce17b01dc)
Justin Chadwell 793082f543
inspect: parse sbom and provenance into json structs
Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit e68c566c1c)
Justin Chadwell fe6f697205
inspect: break after first matching attestation
Signed-off-by: Justin Chadwell <me@jedevc.com>
(cherry picked from commit 19d16aa941)
Tonis Tiigi fd3fb752d3
github: update CI to buildkit v0.11
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 571871b084)
CrazyMax 7fcea64eb4
Merge pull request from thaJeztah/0.10_backport_docs_updates
[0.10 backport] update anchor-links and cli-docs-tool v0.5.1
Sebastiaan van Stijn 05e0ce4953
go.mod: update cli-docs-tool v0.5.1 and re-generate docs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit c97500b117)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn f8d9d1e776
docs: update anchor links
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b8285c17e6)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
CrazyMax 8a7a221a7f
imagetools inspect: handle provenance and sbom
use stub structs for SLSA/SBOM while waiting for
go-imageinspect library to be public.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax e4db8d2a21
imagetools inspect: missing annotations key
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Justin Chadwell 7394853ddf
vendor: update buildkit to v0.11.0-rc4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Justin Chadwell <me@jedevc.com>
Justin Chadwell a8be6b576b
docs: update oci layout with tag resolution
Signed-off-by: Justin Chadwell <me@jedevc.com>
Justin Chadwell 8b960ededd
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>
CrazyMax 4735a71fbd
e2e: use native k3s installation script
debianmaster/actions-k3s action gives some warnings in our e2e
workflow. This commit brings https://github.com/debianmaster/actions-k3s/blob/master/index.js
directly in the workflow through actions/github-script with
some changes to properly wait for nodes to be up.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Tõnis Tiigi 37fce8cc06
Merge pull request from AkihiroSuda/cherrypick-1482-v0.10
[0.10] Propagate SOURCE_DATE_EPOCH from the client env
Akihiro Suda 82476ab039
Propagate SOURCE_DATE_EPOCH from the client env
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
(cherry picked from commit 0e6f5a155e)
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Tõnis Tiigi 88852e2330
Merge pull request from crazy-max/fix-badge
disable buildx experimental in pipeline
CrazyMax 6369c50614
disable buildx experimental in pipeline
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax a22d0a35a4
readme: fix status badge
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax c93c02df85
Merge pull request from jedevc/fixup-git-err-check-order
build: check error from toSolveOpt before adding FrontendAttrs
Justin Chadwell e584c6e1a7 build: check error from toSolveOpt before adding FrontendAttrs
Signed-off-by: Justin Chadwell <me@jedevc.com>
Tõnis Tiigi 64e4c19971
Merge pull request from crazy-max/git-wsl
build: lookup the right git binary on WSL
Tonis Tiigi 551b8f6785
git: do not show warnings if project does not use git
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Tõnis Tiigi fbbe1c1b91
Merge pull request from crazy-max/ci-attest
ci: opt-in sbom and provenance
Tonis Tiigi 1a85745bf1
github: update buildkit image to v0.11-rc3
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
CrazyMax 0d1fea8134
build: warn if git operation fails
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax 19417e76e7
build: lookup the right git binary on WSL
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Tõnis Tiigi 53d88a79ef
Merge pull request from jedevc/attest-warn-duplicate
buildflags: error on duplicate attest field
Justin Chadwell 4c21b7e680
Merge pull request from jedevc/dont-filter-attestation-opts
build: forward all build opts everywhere
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>
CrazyMax ba8e3f9bc5
ci: generate provenance and sbom for bin image
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax 477200d1f9
ci: generate provenance and sbom for release binaries
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Tõnis Tiigi 662738a7e5
Merge pull request from crazy-max/fix-ci
ci: fix warnings
Justin Chadwell f992b77535 buildflags: warn on duplicate attest field
Signed-off-by: Justin Chadwell <me@jedevc.com>
CrazyMax 21b2f135b5
ci: update to ubuntu 22.04
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax 71e6be5d99
ci: fix deprecated set-output syntax
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax df8e7d0a9a
Merge pull request from crazy-max/fix-docs-prerelease
ci: do not publish docs on prerelease
CrazyMax 64422a48d9
Merge pull request from crazy-max/fix-builder-factory
builder: check endpoint from store when loading factory
CrazyMax 04f9c62772
ci: do not publish docs on prerelease
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax 2185d07f05
builder: check endpoint from store when loading factory
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
CrazyMax a49d28e00e
Merge pull request from crazy-max/docker-load
e2e: load to docker store
Tõnis Tiigi 629128c497
Merge pull request from crazy-max/bake-var-null
bake: support null arg and label value