Commit Graph

366 Commits

Author SHA1 Message Date
Tianon Gravi 10520a9335 Add simple Dockerfile for local/development builds 2020-04-24 12:24:27 -07:00
Tianon Gravi ab90d5efb3 Perform release builds in Debian instead of Alpine 2020-04-24 12:12:59 -07:00
Tianon Gravi 6f6d9a6355 Move "bashbrew-entrypoint.sh" into scripts (not used in this repo yet) 2020-04-24 11:52:16 -07:00
Tianon Gravi 5425126232 Move Go code to root of the repo 2020-04-24 11:48:08 -07:00
Tianon Gravi 6ccbd0a7f2 Move "bashbrew-arch-to-goenv.sh" into a scripts subdirectory 2020-04-24 11:39:12 -07:00
Tianon Gravi 7a318e4b33 Minor README updates 2020-04-24 10:58:16 -07:00
Tianon Gravi 8d5a1f8f03 Update .dockerignore 2020-04-24 10:58:08 -07:00
Santiago Torres 0ef538e87e bashbrew:go:cmd-cat: remove extra v in Sprintf
The panic Sprintf for cmd-cat.go has an extra 'v' argument, which
triggers a failure when running go test. Remove the extra 'v' argument.
2020-04-19 22:05:21 -04:00
Tianon Gravi 722e29179a Update bashbrew bits for mips64le (still a WIP, but this lets us progress further) 2020-04-15 11:59:06 -07:00
Tianon Gravi 8f28c0fe22
Merge pull request #24 from infosiftr/mips64le
Add "mips64le" in SupportedArches
2020-04-15 11:55:11 -07:00
Tianon Gravi 18968af85a Update to manifest-tool 1.0.2 2020-04-02 10:03:52 -07:00
Tianon Gravi 3169295522 Update to manifest-tool 1.0.1 2020-03-06 16:30:31 -08:00
Tianon Gravi ce741e2294 Fix Bash 4.3 issue and make scripts fail appropriately for similar issues in future 2020-02-11 15:36:06 -08:00
Tianon Gravi 211f71b45b Add script to detect "naughty" commit histories
I originally wanted this script to be more generic and look for *any* modified binary files that are over a certain threshold, but it took ~88 minutes to run over the entire library, and almost all that time was spent in `git` itself generating commit diffs (since they're not stored on-disk in such a way that those commit diffs are inexpensive to calculate).

I also did a rough prototype in Go using https://github.com/src-d/go-git but it had essentially the same speed (as expected, since it's the underlying data that makes it expensive to calculate, not the language being used to request the data).

So, instead this looks for modified files which match `**.tar**`, which should match the ones we typically worry about anyhow (there are some other problematic cases, but they aren't going to be rebased anytime soon because they've been problematic for so long so aren't worth bending over backwards to detect).
2020-02-07 17:00:54 -08:00
Tianon Gravi da648dc4f7 Update bashbrew builder Dockerfile to Alpine 3.11 2020-01-14 15:57:02 -08:00
Tianon Gravi f3844f04a8 Add "mips64le" in SupportedArches
Looking at https://golang.org/doc/install/source#environment under "GOARCH", this is the accepted Go architecture value for the 64-bit little endian MIPS platform.
2019-12-27 12:24:54 -08:00
Tianon Gravi e326c47745
Merge pull request #23 from infosiftr/go-version
Update Travis Go versions to 1.12 and 1.13
2019-12-10 16:48:16 -08:00
Tianon Gravi 8e25067487 Update Go versions to 1.12 and 1.13
See https://golang.org/doc/go1.12#text/template, especially:

> If a user-defined function called by a template panics, the panic is now caught and returned as an error by the `Execute` or `ExecuteTemplate` method.
2019-12-10 16:36:34 -08:00
Tianon Gravi 5b483686fa
Merge pull request #22 from infosiftr/codecov
Fix codecov on Windows workers by avoiding <()
2019-12-10 16:18:13 -08:00
Tianon Gravi fb43d90657 Fix codecov on Windows workers by avoiding <() 2019-12-10 16:15:41 -08:00
Tianon Gravi 8d6444a1af Adjust "bashbrew" namespace sorting to account for more edge cases
In particular, our namespace changes made `bashbrew list --build-order wordpress php` work properly but `bashbrew --namespace amd64 list --build-order wordpress php` does not -- these changes adjust our sorting to take into account both the namespaced and the non-namespaced version of each tag in our library when checking the `FROM` values for sorting purposes.
2019-09-06 17:42:50 -07:00
Tianon Gravi 40f10346a4 Update bashbrew to Go 1.13 + Alpine 3.10, update manifest-tool to v1.0.0 🎉 2019-09-05 08:55:55 -07:00
Tianon Gravi b378215a98 Remove "put-multiarch" in favor of new "perl-bashbrew" repository
https://github.com/docker-library/perl-bashbrew
2019-07-22 16:40:03 -07:00
Tianon Gravi 28212552fa Skip repos where we have nothing to do ("opensuse", etc) 2019-07-04 15:55:15 -07:00
Tianon Gravi 6c6c2226e4 Update github.com/docker-library/go-dockerlibrary for tag validation 2019-06-26 17:09:28 -07:00
yosifkit fed46530e5
Merge pull request #21 from infosiftr/invalid-tags
Add "(Shared)Tags" validation
2019-06-26 17:08:12 -07:00
Tianon Gravi 3ff8c5ce0d Add "(Shared)Tags" validation 2019-06-26 16:47:34 -07:00
Tianon Gravi 47507557c3 Update "go-dockerlibrary" for fixed "path.Clean" behavior 2019-06-18 16:22:56 -07:00
Tianon Gravi c37ef753c4 Update test to verify "path.Clean" behavior 2019-06-18 16:21:09 -07:00
Tianon Gravi 23fe0d7295 Adjust "GitCommitRegex" to account for potential future sha256 commit IDs 2019-06-18 16:18:51 -07:00
Tianon Gravi ab12b4904b Fix "path.Clean" behavior to take arch-specific Directory values into account too 2019-06-18 16:18:28 -07:00
Tianon Gravi 9d55b441fb Adjust temporary Git tags to also include namespace (and to normalize just in case something that can't be in a Git tag slips through) 2019-06-15 06:45:18 -07:00
Tianon Gravi e36f787052 Merge pull request #6054 from 7AC/master
bashbrew: account for namespaces when sorting repos
2019-06-14 20:13:49 -07:00
Tianon Gravi c922da004c Add "--target-namespace" to both "push" and "put-shared" and make "tag" more intuitive 2019-06-14 16:35:27 -07:00
Tianon Gravi 52682c57a3 Add "DeleteTag" before "CreateTag" to avoid "ErrTagExists" 2019-06-14 14:47:58 -07:00
Tianon Gravi 4029557244 Make "--namespace" a global parameter that affects every command (and add "--target-namespace" to "bashbrew tag") 2019-06-13 16:55:20 -07:00
Giuseppe Valente bc4037dd68 bashbrew: account for namespaces when sorting repos 2019-06-13 16:50:11 -07:00
Tianon Gravi 19e63bbaeb Update golang.org/x/crypto for proper s390x support 2019-06-13 16:37:57 -07:00
Tianon Gravi 0232c51b04 Add new script to also verify "Constraints:" values are correct 2019-06-12 14:36:53 -07:00
Tianon Gravi f7926308bc Switch most "git" operations over to https://github.com/src-d/go-git for a very dramatic speed increase (especially during dependency calculation) 2019-06-12 08:06:45 -07:00
Tianon Gravi c67f06ee5a Remove "apply-constraints" from Travis to make the test more useful (now that the command works properly) 2019-06-12 08:06:45 -07:00
Tianon Gravi 2781cc2621 Apply gofmt 2019-06-12 08:06:45 -07:00
Tianon Gravi 157882047c Improve Dockerfile fetching error reporting and "bashbrew children" / "bashbrew from" handling (especially in the case of no "--apply-constraints" flag) 2019-06-12 08:06:45 -07:00
Tianon Gravi 5bf7a3d9bd Drop "ADD --from=" (which isn't supported by Docker) 2019-06-12 08:06:45 -07:00
Tianon Gravi b939318aa7 Add new "ArchLastStageFrom" function for getting the effective "base" of the given image (needed for docs generation) 2019-06-12 08:06:45 -07:00
Tianon Gravi 62995582c7 Remove "DockerFrom" function entirely to cause scripts to fail and force migration 2019-06-12 08:06:45 -07:00
Tianon Gravi a243c72bda Unexpose "DockerfileMetadata" and add new exposed "DockerFroms" (since that's what's really necessary externally from that internal structure) 2019-06-12 08:06:45 -07:00
Tianon Gravi da87baad5a Add initial "multi-stage" support in bashbrew
This allows bashbrew to properly handle cross-repository and cross-tag dependencies even in the face of multiple `FROM` instructions or `COPY --from=`.

This also provides the scaffolding necessary to implement this in scripts using `bashbrew cat`.

As fallback behavior, the `*DockerFrom` functions should return the `FROM` of the last stage in the `Dockerfile` (which is essentially the `FROM` of the final image).

Also, the output of `bashbrew from` is now a space-separated list.
2019-06-12 08:06:45 -07:00
Tianon Gravi 28a21ad94b Apply 7d4d3222cd ("path.Clean" earlier so "bashbrew cat" shows the cleaned paths appropriately too) 2019-06-05 15:55:17 -07:00
Tianon Gravi 7d4d3222cd Invoke "path.Clean" on "Directory" values in go-dockerlibrary itself (instead of only doing so just before "git archive" inside bashbrew) 2019-06-05 15:49:21 -07:00