Commit Graph

1681 Commits (73b4e04211dedc8b92e62caf15e9de43dd60b0a8)
 

Author SHA1 Message Date
CrazyMax 73b4e04211
controller: remove MetadataFile from CommonOptions
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 9df197046c
bake: use controller to build
With this change we are now passing a list of controller options
to run a build and returns a map of responses and result context
as bake can handle a list of targets.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell 9387640676
bake: use controller build options as an intermediate stage
With the previous changes to bring controllerapi.BuildOptions up to date
with build.Options, we can have bake generate
controllerapi.BuildOptions, and then convert those to build.Option using
the controller/build package.

This is an intermediate patch, designed to allow us to clean up some
shared logic between both build and bake. The next step will be to
modify bake to use the controller api, and completely skip the
build.Options generation step.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell 3c3e4a6d5f
controller: refactor build inputs to external struct
This patch continues the move to attempt to merge the build.Options
struct into the controllerapi.Options message.

To do this, we extract all the input parameters into a dedicated message
(adding the missing ones, except for the InStream parameter which will
require some additional fiddling around). We also rework the
NamedContexts to allow containing States (by transmitting them as
DefinitionOps), and adding a Linked field to the common options.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Tõnis Tiigi ea06685c11
Merge pull request #1858 from potherca-contrib/fix/typo-Shortand
Fix typo "Shortand" -> "Shorthand"
2 years ago
Ben Peachey eaba4fa9e6
Update docs with result from `make docs` command.
Signed-off-by: Ben Peachey <potherca@gmail.com>
2 years ago
CrazyMax 99e3882e2a
Merge pull request #1841 from crazy-max/desktop
build: display build details link
2 years ago
CrazyMax 0a2f35970c
build: display build details link
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax ab5f5e4169
build: fix quiet mode
We are using the quiet flag option and we are not taking
progress quiet mode into account

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell 696770d29c
Merge pull request #1840 from jedevc/fix-check-path-for-bake-cmd-context 2 years ago
Justin Chadwell d34103b0d9 bake: fix potential context entitlements escape
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell c820350b5e tests: refactor cmd helpers to allow configuring cwd, etc
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 61a7854659 tests: add bake test for remote subdir context
Fixed in 12b6a3ad9a, but now we have
regression tests! So we can add a check that we don't break this
behavior again.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell e859ebc12e tests: add bake test for remote cmd context override
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell ef997fd6d0 bake: fix BAKE_CMD_CONTEXT relative path resolution
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 76c96347ff tests: add basic remote bake context test
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 48d7dafbd5 git: update gitutil test utilities
- Adds a new GitServeHTTP function to start an http server to serve a
  target git repository.
- Adds a new GitDir helper method to get the path to the .git
  directory
- Updates the GitAdd method to take a variable number of files

Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell d03e93f6f1 test: tmpdir can be a test helper
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell fcb7810a38
Merge pull request #1854 from crazy-max/inspect-features 2 years ago
Justin Chadwell 7cef021a8a
Merge pull request #1804 from jedevc/fixup-solve 2 years ago
Justin Chadwell c6db4cf342 build: clarify NewResultHandle comment
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
CrazyMax 6c9436fbd5
inspect: display builder features
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell a906149930
Merge pull request #1862 from jedevc/update-contributing-tests
docs: update CONTRIBUTING.md with specific test notes
2 years ago
Justin Chadwell af328fe413 docs: update CONTRIBUTING.md with specific test notes
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell b7f0b3d763 build: clear exports for secondary solve request
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 5b27d5a9f6 build: cleanup res if returned in basic build
In practice, this shouldn't happen, but the check is good to include
anyways.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Ben Peachey 8f24c58f4d
Fix typo in commands/build.go and docs/reference/buildx_build.md
`Shortand` -> `Shorthand`

Signed-off-by: Ben Peachey <potherca@gmail.com>
2 years ago
Justin Chadwell cd1648192e build: rename ResultContext to ResultHandle
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
Justin Chadwell 8d822fb06c build: move main solve request into main gateway call
Now, we always perform the full solve request in the main gateway call.
This ensures that progress works properly, and makes the lifetime
semantics much clearer.

NewResultContext abstracts the details of a successful/failed build, to
always return a single ResultContext, even though the details of how a
gateway is created is different:
- For a failed build, we can just keep the gateway open.
- For a successful build, we immediately open another gateway and
  re-evaluate the build definition in that gateway. This should give an
  instant cache hit (since the build was just successful).

Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
CrazyMax 0758a9b75d
Merge pull request #1856 from crazy-max/history-feature-update
driver: update history api check
2 years ago
CrazyMax f8fa526678
driver: update history api check
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Tõnis Tiigi 4abff3ce12
Merge pull request #1852 from jedevc/vendor-buildkit-master
vendor: update buildkit to master@c36941f4a10e
2 years ago
CrazyMax e7034f66bc
Merge pull request #1846 from crazy-max/history-capability
driver: check history capability
2 years ago
CrazyMax 8c65e4fc1d
driver: add context to Features interface
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax d196ac347e
driver: cache features
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 9b723ece46
driver: check history capability
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
Justin Chadwell 5e2f8bd64a
Merge pull request #1853 from jedevc/logrus-show-error 2 years ago
Justin Chadwell 5788ab33d2 logutil: print error from WithError if found
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
CrazyMax f1788002e1
Merge pull request #1851 from crazy-max/test-flow
test: update workflow
2 years ago
Justin Chadwell 6c62225d1b vendor: update buildkit to master@c36941f4a10e
Signed-off-by: Justin Chadwell <me@jedevc.com>
2 years ago
CrazyMax 38b4eef5c6
ci: make release and bin-image depend on test
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax a4db138c5e
docs: update CONTRIBUTING.md to run tests
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 55377b2b0f
make: test-unit and test-integration targets
Also switch test target to run the test script.

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 98dedd3225
ci: cache integration tests base and build in dedicated step
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 74b121be66
test: opt to avoid building the integration tests image
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax b9cf46785b
test: use trap to remove cache volume
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax ecf8dd0a26
test: type integration not needed
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 73c17ef4d2
ci: send test reports to codecov
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax e762e46b4b
ci: merge test workflow to build one
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2 years ago
CrazyMax 17bdbbd3c3
Merge pull request #1831 from crazy-max/fix-ctn-certs-path
driver(docker-container): fix incorrect path when writing certs
2 years ago