Commit Graph

203 Commits

Author SHA1 Message Date
Tianon Gravi 61ca39fc4f Add explicit binary version and resurrect "bashbrew.sh" for helping users compile from source 2020-04-24 13:26:39 -07:00
Tianon Gravi 173e6d74dc Update Jenkins URLs and add GitHub Actions badge 2020-04-24 13:08:53 -07:00
Tianon Gravi c0bcfc0b91 Add initial GitHub Actions 2020-04-24 12:45:02 -07:00
Tianon Gravi f0377aba26 Add initial Jenkinsfile 2020-04-24 12:36:15 -07:00
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 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 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
Tianon Gravi 47507557c3 Update "go-dockerlibrary" for fixed "path.Clean" behavior 2019-06-18 16:22:56 -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 9f26ec45e1 Tag our put-multiarch image and explicitly use itself for cache 2019-05-10 17:31:11 -07:00
Tianon Gravi ef26a55720 Fix "arm32" vs "arm" bug 2019-05-10 17:21:35 -07:00
Tianon Gravi d1cb5996f7 Add optional "--dry-run" flag for pre-testing "heavy" pushes 2019-05-10 16:55:53 -07:00
Tianon Gravi db8b401468 Treat 401 the same as 404 when fetching a manifest 2019-05-10 16:38:41 -07:00
Tianon Gravi af23605e63 Add new "put-multiarch" script
This is a replacement for `bashbrew put-shared` (without `--single-arch`) that takes some shortcuts to get a pretty decent speed gain which should allow us to go back to the naïve solution of "push everything from each arch `:xyz-tag` to the multiarch repo's `:xyz-tag` and still have reasonable performance.

This was tested by pushing all ~3700 tags we currently have to https://hub.docker.com/u/trollin and for a full no-op we were around 8.5 minutes, and for a full forced push of every tag manifest (with no necessary blob mounts) we were around 45 minutes.
2019-05-09 16:53:24 -07:00
Tianon Gravi 1c24c31208 Update bashbrew readme (thanks @7AC) 2019-04-04 13:25:24 -07:00
Tianon Gravi 73d98151b5 First attempt to fix Travis (force Go modules "on") 2019-03-28 21:39:21 -07:00
Tianon Gravi d5559299cf Port bashbrew to use Go modules instead of GB
Something in here also fixes the "missing build output on error" bug we've been seeing on Jenkins (see https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/rabbitmq/184/console for example).
2019-03-28 15:45:12 -07:00