Commit Graph

31 Commits

Author SHA1 Message Date
Tianon Gravi 24ac7970ec Add a simple bashbrew TODO 2017-03-13 10:33:54 -07:00
Tianon Gravi 35a8aa6aab Apply "gofmt" 2017-02-10 12:41:10 -08:00
Tianon Gravi a71b16ff95 Update "github.com/docker-library/go-dockerlibrary" vendoring (improved error handling, more edge cases) 2017-01-24 13:56:03 -08:00
Tianon Gravi 32e7199775 Update "pault.ag/go/debian" vendoring 2017-01-24 13:48:42 -08:00
Tianon Gravi 3086073bf4 Update bashbrew to cache remote tag fetches (speeds up "--all" operations by avoiding "git fetch" where we already have a cached answer in Git)
Example tag name: `git-/github.com/docker/notary-official-images-refs/tags/v0.5.0-FETCH_HEAD`

Referring to:
```
signer-0.5.0: git://github.com/docker/notary-official-images@v0.5.0 notary-signer
```
2016-11-17 16:51:39 -08:00
Tianon Gravi 8d1c134bfe Update bashbrew Constraints logic with several fixes
- only print a Constraints-related "skipping" warning for a given "repo:tag" once per session
- apply constraints while sorting too (so that `bashbrew build --all` on Windows doesn't try to `git fetch` Linux rootfs tarballs only to skip them during build, for example)
- add `--apply-constraints` flag to `from`, `children`, and `parents` subcommands
2016-11-17 15:53:28 -08:00
Tianon Gravi 54636545aa Move "build order" sorting functions into a common file and refactor them to use topsort properly and via a single unified function (single node per logical "thing" we're sorting, resolve tag names to canonical node names appropriately) 2016-09-22 10:18:30 -07:00
Tianon Gravi 86c6275af3 Adjust bashbrew such that env overrides config appropriately 2016-07-28 11:30:54 -07:00
Tianon Gravi 144fae7159 Add a separate "EntryIdentifier" so that build output is more informative
This changes something like:

    Using bashbrew/cache:2775145643e397ca993e842f3263a1362a49df4115ce59d59bed1452323b7af2 (buildpack-deps)

into:

    Using bashbrew/cache:2775145643e397ca993e842f3263a1362a49df4115ce59d59bed1452323b7af2 (buildpack-deps:wheezy)
2016-07-22 10:00:36 -07:00
Tianon Gravi 64a28af865 Update "github.com/docker-library/go-dockerlibrary" for parsing line-based maintainers comments 2016-07-20 11:23:22 -07:00
Joe Ferguson a712a5d847 Add DockerCacheName to be able to use it from templates
- like the following to get golang:latest and the cache name of its parent
   ```console
   $ bashbrew cat --format '{{ range .Entries }}{{ $.DockerCacheName . }}{{ range .Tags }}{{"\n"}}{{ join ":" $.RepoName . }}{{end}}{{"\n"}}{{end}}' golang:latest
   ```
2016-07-06 13:27:39 -07:00
Tianon Gravi e258fd891b Capture "command failure" while reading Dockerfiles for FROM lines 2016-06-27 11:10:14 -07:00
Tianon Gravi e559474524 Fix spurious "bad file descriptor" errors in bashbrew by using "exec.Cmd" objects more appropriately while streaming 2016-06-24 17:32:43 -07:00
Stuart Clark cae164741c Correct typo in bashbrew push --namespace message 2016-06-22 05:51:11 +01:00
Tianon Gravi b431d5eac1 Rewrite constraints logic to actually work properly 2016-06-10 11:32:23 -07:00
Tianon Gravi 45c8ce94e2 Allow only "http" and "https" URLs 2016-06-08 10:37:08 -07:00
Tianon Gravi e4353713d2 Facepalm 2016-06-08 10:24:53 -07:00
Tianon Gravi 9a6109687d First attempt to unstick Windows 2016-06-08 10:23:58 -07:00
Tianon Gravi 446e368fe1 Add support for "--pull always", "--pull missing", and "--pull never" (replacing "--pull-missing") 2016-06-07 16:40:52 -07:00
Tianon Gravi bed693c79a Auto-upgrade "git://github.com/..." to "https://github.com/..." (with a warning) 2016-06-07 16:14:30 -07:00
Tianon Gravi 60f6f6dd9e Apply constraints during "tag" and "push" (since they're only useful after "build", at least currently) 2016-06-07 12:24:01 -07:00
Tianon Gravi 19621bf245 Add extra output when we're "Using" an older dockerCacheHash, even if we didn't need to build it 2016-06-06 16:30:10 -07:00
Tianon Gravi a48a191751 Also remove "-f" from "docker tag" (since it's deprecated in 1.10+ and removed in 1.12+) 2016-06-06 11:37:54 -07:00
Tianon Gravi 41c7a5952f Explicitly note that Docker 1.10+ is required for the new Bashbrew
This is especially thanks to https://github.com/docker/docker/issues/15785 and thus c8cc4fb8d9.
2016-06-06 10:41:10 -07:00
Tianon Gravi 5b00dc4395 Add a "--repos" flag to "bashbrew list" to prefer to list only repos 2016-06-03 14:29:26 -07:00
Tianon Gravi 2068a11e02 Fix "bashbrew list --uniq --build-order alpine:latest alpine:3.3" (to properly list two tags instead of just one) 2016-06-03 14:28:40 -07:00
Tianon Gravi 3538a9d438 Rename "--verbose" to the more-apt "--debug", and adjust "docker build" to _always_ capture output (expect when debug mode is enabled and it's piped directly to the user) so that it can be included in the error response if the build fails 2016-06-03 12:15:55 -07:00
Tianon Gravi c83bafa7a7 Don't pull scratch 2016-06-03 11:01:23 -07:00
Tianon Gravi 9e49f3ed54 Use cli's "MultiError" construct to provide useful context for top-level cmd-*.go errors 2016-06-03 10:23:09 -07:00
Tianon Gravi e5d3901d84 Add a "--format-file" flag to "bashbrew cat" which overrides "--format" with the contents of a file (and add more useful functions to our template processing) 2016-06-03 10:23:09 -07:00
Tianon Gravi 54b895bfb1 Convert "bashbrew" to Go and add a new RFC 2822 manifest file format
To satisfy both Windows (https://github.com/docker-library/golang/pull/92) building and "non-AUFS" (https://github.com/docker-library/official-images/pull/1612, https://github.com/docker-library/official-images/pull/1537) building ("build machine" constraints, if you will), an update to the manifest file format is necessary.

To this end, we're introducing a new format which uses RFC 2822, allowing much more expressivity (especially for additional metadata like `Constraints`) and readability.  The new tool also includes backwards compatibility for the older line-based manifest file format, but its usage is discouraged (and we will be slowly converting at least the `docker-library` repos to use the new format in their `generate-stackbrew-library.sh` scripts).

One of the tangential benefits of this conversion is a massive increase in the speed of the tool (`bashbrew list --all` on a very fast system with an SSD and a flaming hot cache used to take ~5s and now takes ~0.012s).
2016-06-03 10:23:09 -07:00