Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
bd3ddaa
Introduce `build` command by cloning `buildx bake`
ndeloof Sep 23, 2019
fb7d30f
produce bundle
ndeloof Sep 24, 2019
9233c7d
Workaround buildx#149 to get built images digests
ndeloof Sep 25, 2019
0482f1f
Confusion between content digest and registry digest
ndeloof Oct 2, 2019
c4de3c0
Remove obsolete commands and tests
ndeloof Sep 26, 2019
cb5d38c
Include fixes by buildx team
ndeloof Sep 27, 2019
f086fc4
Create bundle from tag, or compute a digest
ndeloof Sep 27, 2019
7e675b7
e2e test to check build command
ndeloof Sep 27, 2019
a065a85
Bundle is not a command anymore
ndeloof Oct 1, 2019
9fed641
Adjust e2e tests 'bundle' being replaced by 'build'
ndeloof Oct 2, 2019
1e20328
Directly convert compose into build.Options
ndeloof Oct 2, 2019
08a188c
Parse compose file as plain YAML
ndeloof Oct 2, 2019
97d0c0f
Test case to cover conversion of compose file into build.Option
ndeloof Oct 2, 2019
26f0a99
Dep ensure
ndeloof Oct 3, 2019
e92d3d8
Check engine do offer BuildKit support
ndeloof Oct 3, 2019
df905c1
Split build.go into smaller dedicated files
ndeloof Oct 3, 2019
f8d4ef7
lint
ndeloof Oct 3, 2019
473578b
Run e2e build test in DinD
ndeloof Oct 3, 2019
5b19f9c
naming things...
ndeloof Oct 3, 2019
9c3af5c
Tag service image as name:version-service
ndeloof Oct 3, 2019
d1fe2d9
Hide --output command, require a tag
ndeloof Oct 4, 2019
32afd02
Remove --output option
ndeloof Oct 4, 2019
ee2ee18
Tag service images according to compose spec
ndeloof Oct 4, 2019
934071a
Fix TestPushInstallBundle
ndeloof Oct 4, 2019
57a171d
Code cleanup
ndeloof Oct 7, 2019
79d9faa
docker-compose do allow to pass build.image: ''
ndeloof Oct 7, 2019
2766cd7
Inspect image we've built to get Size
ndeloof Oct 7, 2019
3281831
use 'build' in e2e test to replace 'bundle'
ndeloof Oct 7, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
148 changes: 143 additions & 5 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@

required = ["github.com/wadey/gocovmerge"]

[[constraint]]
name = "github.com/docker/buildx"
version = "=v0.3.1"

[[override]]
name = "github.com/moby/buildkit"
version = "=v0.6.2"

[[override]]
name = "github.com/jaguilar/vt100"
source = "github.com/tonistiigi/vt100"
revision = "ad4c4a5743050fb7f88ce968dca9422f72a0e3f2"

# We need runc at least 0.0.9 to get otherwise missing stubs for non-linux platforms.
# We need > 0.1.1 as it depends on uppercase Sirupsen/logrus.
[[override]]
Expand Down
46 changes: 46 additions & 0 deletions e2e/build_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package e2e

import (
"encoding/json"
"io/ioutil"
"path"
"strings"
"testing"

"github.com/deislabs/cnab-go/bundle"
"gotest.tools/assert"
"gotest.tools/icmd"
)

func TestBuild(t *testing.T) {
runWithDindSwarmAndRegistry(t, func(info dindSwarmAndRegistryInfo) {
cmd := info.configuredCmd

testDir := path.Join("testdata", "build")
cmd.Command = dockerCli.Command("app", "build", path.Join(testDir, "single"), "single:1.0.0")
icmd.RunCmd(cmd).Assert(t, icmd.Success)

var cfg string
for _, s := range cmd.Env {
if strings.HasPrefix(s, "DOCKER_CONFIG=") {
cfg = s[14:]
}
}
if cfg == "" {
t.Fatalf("Failed to retrieve docker config folder")
}

f := path.Join(cfg, "app", "bundles", "docker.io", "library", "single", "_tags", "1.0.0.json")
data, err := ioutil.ReadFile(f)
assert.NilError(t, err)
var bndl bundle.Bundle
err = json.Unmarshal(data, &bndl)
assert.NilError(t, err)

built := []string{bndl.InvocationImages[0].Digest, bndl.Images["web"].Digest, bndl.Images["worker"].Digest}
for _, ref := range built {
cmd.Command = dockerCli.Command("inspect", ref)
icmd.RunCmd(cmd).Assert(t, icmd.Success)
}
})
}
Loading