Commit Graph

184 Commits

Author SHA1 Message Date
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
Tianon Gravi 26d2eab54b Update Bashbrew builds to Go 1.12
(and update `manifest-tool` to 1.0.0-rc; bombs away, @estesp!)
2019-03-14 14:52:22 -07:00
Tianon Gravi 079cc45216 Fix bashism 2019-03-12 22:10:05 -07:00
Tianon Gravi ccf4f480a7 Hotfix: "bashbrew build" sorting fix 2019-01-28 17:01:16 -08:00
Tianon Gravi a93f9f538f Improve bashbrew SharedTags handling (explicitly allowed for "bashbrew cat", etc) 2019-01-28 16:16:50 -08:00
Tianon Gravi 1693d9a9e6 Update go-dockerlibrary to include https://github.com/docker-library/go-dockerlibrary/pull/19 2019-01-07 16:22:36 -08:00
Tianon Gravi 2dee8376c4 Update to manifest-tool 0.9.0 2018-11-26 20:22:07 -08:00
Tianon Gravi ed5b868911 Update "gpg" invocations to use "--batch"
See https://bugs.debian.org/913614
2018-11-14 13:08:09 -08:00
Tianon Gravi 52138c6dbe Add "naughty-from.sh" script inspired by the report of the same name
This verifies that the "Architectures" field of each entry in a given pull request is a subset of its parent.
2018-10-29 22:44:56 -07:00
Tianon Gravi 0335845df0 Stop testing "extra commands" on bashbrew changes (so they'll succeed more often) 2018-10-29 21:47:25 -07:00
Tianon Gravi 6a1a2d2c1d Add support for "File:" in manifest files
See https://github.com/docker-library/go-dockerlibrary/pull/16 for format implementation details.
2018-10-22 16:06:21 -07:00
Tianon Gravi 5cbc68680a Add new "archFilter" template function
Example usage:

```
{{- range $i, $e := ($archSpecific | ternary (archFilter arch $.Entries) $.Entries) -}}
    ...
{{- end -}}
```
2018-08-23 11:37:13 -07:00
Tianon Gravi 1e37e9b879 Update bashbrew release binaries to Go 1.10 2018-08-14 12:51:30 -07:00
Tianon Gravi 9911b85e11 Slightly improved error message for failed template executions 2018-08-14 12:48:04 -07:00
Tianon Gravi ae92f4d748 Add a note about pre-built bashbrew binaries 2018-07-20 13:10:57 -07:00
Tianon Gravi afbe0d6f03 Improve put-shared noop behavior and add "--force" flag for pushing operations 2018-05-03 12:21:57 -07:00
Tianon Gravi 15a94e48fa Add "gpgconf --kill all" to bashbrew build Dockerfile (partially as a test for other images)
This helps combat the following race condition:

    + rm -rf /tmp/tmp.FHddOB
    rm: can't remove '/tmp/tmp.FHddOB/S.gpg-agent.browser': No such file or directory
2018-04-06 09:28:44 -07:00
Tianon Gravi b4cc45e64f Adjust wording 2018-03-20 10:11:34 -07:00
Tianon Gravi f3aced2ea4 Fix grep logic 2018-03-20 10:11:34 -07:00
Tianon Gravi 4e74853942 Add simple Travis test for incorrect "latest" tags
```console
$ TRAVIS_BRANCH=master TRAVIS_PULL_REQUEST=false ./bashbrew/travis.sh
Testing master -- BUILD ALL THE THINGS!

Incorrectly 'latest' tags detected:
  geonetwork:latest-postgres

Read https://github.com/docker-library/official-images#tags-and-aliases for more details.

```
2018-03-20 10:11:34 -07:00