1867 Commits

Author SHA1 Message Date
CrazyMax
36d95bd3b9
ci: generate releases.json on release event
We are currently using the GitHub API in our setup-buildx-action
to check for latest and tagged releases to make sure they exist
before download. But this requires using a token to avoid
rate-limit. It's fine for public runners but GHES runners don't
have the `github.token` populated automatically. They need to
create a PAT.

This PR will solve this issue by generating and pushing a
`releases.json` file in this repo when we publish a GitHub Release
that will then be fetched through `raw.githubusercontent.com`
endpoint on `setup-buildx-action` repo. This endpoint is better
served for our purpose with 5000 requests per hour compared to the
GitHub API endpoint that is limited to 60 requests per hour (unauth)
and 1000 request per hour when authenticated.

Also ignore .github/releases.json file on pull request event as an
action in a workflow run can't trigger a new workflow run anyway.
See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#example-using-more-than-one-event

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-30 11:46:47 +01:00
Tonis Tiigi
c33b310b48
build: fix multi-node merge to read descriptor from result
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-01-29 22:52:41 -08:00
Justin Chadwell
8af76c68a8
Merge pull request #1564 from AkihiroSuda/fix-1562
bake: SOURCE_DATE_EPOCH: fix `panic: assignment to entry in nil map`
2023-01-29 22:07:20 +00:00
Akihiro Suda
1f56f51740
bake: SOURCE_DATE_EPOCH: fix panic: assignment to entry in nil map
Fix issue 1562

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2023-01-29 08:43:06 +09:00
CrazyMax
49b3c0dba5
build: fix preferred platform not taken account
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-27 20:02:13 +01:00
Tõnis Tiigi
a718d07f64
Merge pull request #1559 from tonistiigi/update-buildkit-v0.11.2
vendor: update buildkit to v0.11.2
2023-01-26 10:57:21 -08:00
Tonis Tiigi
f6da7ee135
vendor: update buildkit to v0.11.2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-01-26 10:33:20 -08:00
CrazyMax
7eb266de69
go.mod: bump to Go 1.19
Go 1.20 will be there soon, I think it's time to move our go.mod to
latest stable. We can then remove the compat in our vendor.Dockerfile

Downstream projects like compose or github.com/linuxkit/linuxkit should
not be affected.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-26 16:08:09 +01:00
CrazyMax
9f821dabeb
Merge pull request #1548 from crazy-max/git-ls-remote
build: set remote origin url
2023-01-26 11:03:18 +01:00
Kohei Tokunaga
a27b8395b1 Enable to run build and invoke in background
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-01-26 17:17:07 +09:00
Tõnis Tiigi
b1b4e64c97
Merge pull request #1504 from jedevc/fix-1497
Refactor BuildWithResultHandler to simplify concurrency usage
2023-01-25 10:52:17 -08:00
CrazyMax
c1058c17aa
build: set remote origin url
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-25 18:15:05 +01:00
Tõnis Tiigi
059c347fc2
Merge pull request #1549 from jedevc/silence-intoto-warnings
imagetools: silence intoto warnings
2023-01-24 17:03:49 -08:00
Justin Chadwell
7145e021f9 imagetools: silence intoto warnings
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-24 16:49:28 +00:00
CrazyMax
9723f4f76c
Merge pull request #1547 from crazy-max/fix-rm
rm: do not check for context builders when removing inactive
2023-01-24 13:39:36 +01:00
Justin Chadwell
db72d0cc05
Merge pull request #1543 from jedevc/bump-ci-buildkit
ci: update buildkit release version in build pipeline
2023-01-24 12:17:34 +00:00
Justin Chadwell
00b7d5b858
Merge pull request #1505 from jedevc/inspect-lazy-attestations
Lazily load attestation data in `imagetools inspect`
2023-01-24 12:10:11 +00:00
CrazyMax
6cd0c11ab1
rm: do not check for context builders when removing inactive
This change has been introduced in e7b5ee7518703fb284fd9ece81abf71e4838f4d9
but we should not check context builders when removing inactive
ones.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-24 13:08:18 +01:00
Justin Chadwell
c1ab55a3f2 ci: update buildkit release version in build pipeline
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-24 11:47:58 +00:00
Justin Chadwell
c756e3ba96
Merge pull request #1534 from jedevc/readme-minimum-docker-version
docs: add note about minimum docker version
2023-01-24 11:02:21 +00:00
Justin Chadwell
566f37b65b docs: add note about minimum docker version
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-24 10:25:58 +00:00
CrazyMax
6d1ff27410
Merge pull request #1538 from tonistiigi/caps-req-internal
build: mark capabilities request as internal
2023-01-24 11:12:37 +01:00
Tonis Tiigi
be55b41427
build: mark capabilities request as internal
So it doesn't show up in the History API.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-01-24 00:48:35 -08:00
Tõnis Tiigi
a4f01b41a4
Merge pull request #1529 from thaJeztah/update_buildkit
vendor: github.com/moby/buildkit v0.11.1
2023-01-18 12:56:26 -08:00
Sebastiaan van Stijn
01e1c28dd9
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>
2023-01-18 20:56:54 +01:00
Tõnis Tiigi
51e41b16db
Merge pull request #1511 from jedevc/error-on-attestations-docker
build: error when using docker exporter and attestations
2023-01-17 09:57:48 -08:00
Justin Chadwell
9e9cdc2e6d
Merge pull request #1525 from jedevc/ci-bump-buildx
ci: update buildx release version in build pipeline
2023-01-17 16:39:39 +00:00
Justin Chadwell
bc1d590ca7 ci: update buildx release version in build pipeline
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-17 15:21:52 +00:00
Justin Chadwell
900d9c294d
Merge pull request #1523 from jedevc/docs-reference-attest
docs: add reference for new attest family of flags
2023-01-17 13:47:10 +00:00
CrazyMax
65aac16139
Merge pull request #1512 from nicks/patch-1
docs: small tweak to opentelemetry
2023-01-17 13:30:33 +01:00
Justin Chadwell
4903f462f6 docs: add reference for new attest family of flags
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-17 11:45:38 +00:00
Justin Chadwell
44b5a19c13
Merge pull request #1516 from dvdksn/docs/fix-broken-bake-link-in-cli-reference
docs: fix broken link in buildx_bake CLI reference
2023-01-17 11:11:54 +00:00
David Karlsson
ba8fa6c403 docs: fix broken link in buildx_bake CLI reference
Signed-off-by: David Karlsson <david.karlsson@docker.com>
2023-01-13 15:33:31 +01:00
CrazyMax
5b3083e9e1
Merge pull request #1515 from crazy-max/fix-docs-release
ci: fix typo in docs-release workflow
2023-01-13 15:16:16 +01:00
CrazyMax
523a16aa35
ci: fix typo in docs-release workflow
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-01-13 15:10:03 +01:00
Justin Chadwell
43a748fd15 build: error when using docker exporter and attestations
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-13 13:41:53 +00:00
Justin Chadwell
15a80b56b5 build: avoid compatability error when attestations disabled
We should avoid erroring with attestations support compatability errors
when a user has specified --provenance=false.

A user may wish to enable --provenance=false that works across buildkit
versions, but currently it will fail on old versions - this patch fixes
this, to silently ignore the provenance flag for this check if it's set
to disabled.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-13 13:36:55 +00:00
Nick Santos
b14bfb9fa2
docs: small tweak to opentelemetry
The buildx builder persists across Desktop restarts. So when we start up Jaeger, we should recommend that people configure it to persist across restarts as well.

Signed-off-by: Nick Santos <nick.santos@docker.com>
2023-01-11 12:09:05 -05:00
Justin Chadwell
56950ece69 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>
2023-01-10 13:00:42 +00:00
Justin Chadwell
1d2ac78443 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>
2023-01-10 12:40:42 +00:00
Justin Chadwell
8b7aa1a168 build: create error group per opt
Using the syncronization primitive, we can avoid needing to create a
separate wait group.

This allows us to sidestep the issue where the wait group could be
completed, but the build invocation functions had not terminated - if
one of the functions was to terminate with an error, then it was
possible to encounter a race condition, where the result handling code
would begin executing, despite an error.

The refactor to use a separate error group which more elegantly handles
the concept of function returns and errors, ensures that we can't
encounter this issue.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-10 11:02:27 +00:00
Justin Chadwell
1180d919f5 build: reorder error group funcs
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-10 10:50:15 +00:00
Justin Chadwell
347417ee12 build: use copy for BuildWithResultHandler loop vars
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-10 10:50:15 +00:00
Justin Chadwell
fb27e3f919
Merge pull request #1502 from developer-guy/fix/readme
fix the directory of the buildx binary
2023-01-10 10:28:04 +00:00
Batuhan Apaydın
edb16f8aab
fix the directory of the buildx binary
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2023-01-10 11:26:11 +03:00
Tõnis Tiigi
5c56e947fe
Merge pull request #1500 from tonistiigi/update-buildkit-v0.11.0
github: update CI to buildkit v0.11
2023-01-09 15:59:25 -08:00
Tonis Tiigi
571871b084
github: update CI to buildkit v0.11
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2023-01-09 15:50:56 -08:00
Tõnis Tiigi
8340c40647
Merge pull request #1498 from jedevc/attestation-printing
Improved attestation inspect
2023-01-09 11:22:20 -08:00
Justin Chadwell
9818055b0e docs: update with new inspect output
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-09 19:07:10 +00:00
Justin Chadwell
484823c97d inspect: change additional spdxs to not have duplicates
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-09 19:03:23 +00:00