Commit Graph

546 Commits

Author SHA1 Message Date
Tianon Gravi 9939a32336
Merge pull request #112 from infosiftr/windows-2025
Add support for Windows 2025 in GHA scripts
2025-01-08 11:40:01 -08:00
yosifkit f4bda73464
Merge pull request #111 from infosiftr/os-matrix
Update OS matrix in smoke test
2025-01-07 16:42:56 -08:00
Tianon Gravi 828989bcc1 Add support for Windows 2025 in GHA scripts 2024-12-19 23:46:48 -08:00
Tianon Gravi 516951ac06 Update OS matrix in smoke test
This adds more explicit Ubuntu variants + Windows 2025
2024-12-19 23:41:14 -08:00
yosifkit f71d6ef63e
Merge pull request #107 from infosiftr/bashbrew-buildkit-syntax
Remove `.bashbrew-buildkit-syntax` fallback in GHA
2024-10-14 16:26:53 -07:00
Tianon Gravi d114db232b Remove `.bashbrew-buildkit-syntax` fallback in GHA
This was left in intentionally as a backwards-compatibility shim during the transition to the script, but is no longer necessary.
2024-10-07 15:23:52 -07:00
yosifkit b0b055e5ca
Merge pull request #106 from infosiftr/BASHBREW_LIBRARY
Fix behavior around `BASHBREW_LIBRARY` in GHA
2024-09-30 11:52:45 -07:00
Tianon Gravi d64a9e81b0 Fix behavior around `BASHBREW_LIBRARY` in GHA
This script needs/uses a custom `BASHBREW_LIBRARY` directory, but it stores that value in the exported environment slightly too soon such that `generate-stackbrew-library.sh` picks it up (and shouldn't be).

We often use "`BASHBREW_LIBRARY` is unset (or empty)" as a conditional for whether to fall back to using "https://github.com/docker-library/official-images/raw/HEAD/library/" as an explicit prefix for querying "source of truth" values for things like supported parent architectures.

These two things collided in cc2dc88e04 (and similar commits) because the script saw `BASHBREW_LIBRARY` set, trusted it, but then fails to find the parent image.

This is the cleanest place to fix this such that `generate-stackbrew-library.sh` can take `BASHBREW_LIBRARY` from the provided environment instead of using our generated value.
2024-09-30 11:46:48 -07:00
yosifkit 7afe152f6d
Merge pull request #105 from infosiftr/explicit-full-gitcommit
Enforce that `GitCommit` must be a *full* commit hash
2024-08-13 12:58:32 -07:00
Tianon Gravi 5f27132981 Enforce that `GitCommit` must be a *full* commit hash
I thought this was already the behavior, but I guess it was relaxed because previous iterations of this validation had to apply to the older format where we'd been less meticulous about enforcing this.  Since those are all gone now, we can safely update the validation to enforce that commit hashes *must* be fully qualified.
2024-08-13 11:27:28 -07:00
yosifkit 63bf7cff3d
Merge pull request #103 from infosiftr/codecov
Disable Codecov (for now)
2024-07-10 14:25:48 -07:00
Tianon Gravi a00d28f873 Disable Codecov (for now)
It's been failing to upload for a while, and I don't think the failures are *completely* their fault (GitHub's got to share some of the blame, I think), but the end result is that we don't really have any good options for continuing to use the service (bad/unacceptable options include install an app with way too many privileges on the org/repo or add a "secret" with a personal access token ... and make that available to Pull Requests too 🙃).
2024-07-10 12:19:33 -07:00
Tianon Gravi 573448144c Update to actions/checkout@v4 🙃
(this is effectively a functional no-op solving a "problem" that really ought to be solved at a different level within GHA)
2024-07-09 15:42:00 -07:00
yosifkit 10343d331c
Merge pull request #96 from infosiftr/rpm-host-arch
Add RPM support to `bashbrew-host-arch.sh` (via querying RPM's own architecture)
2024-05-29 14:31:33 -07:00
Tianon Gravi 6c47dbbb89 Add RPM support to `bashbrew-host-arch.sh` (via querying RPM's own architecture)
This should be more reliable/correct than `uname -m` (because we're almost always looking for the *userspace* architecture, not the kernel architecture).
2024-05-29 10:34:48 -07:00
Tianon Gravi 12c758028e
Merge pull request #94 from gdams/patch-1
actions: bump setup-go to v5
2024-03-14 10:54:01 -07:00
George Adams eb75ef6ada
actions: bump setup-go to v5
Removes the warnings about Node.js 16 actions being deprecated
2024-03-13 16:01:24 +00:00
Tianon Gravi ab71ba78bf Bump version to 0.1.13 (post-release) 2024-03-05 11:16:54 -08:00
yosifkit d23b94357e
Merge pull request #93 from infosiftr/gitfs-symlinks
Fix gitfs symlink handling
2024-02-26 13:55:19 -08:00
Tianon Gravi 722f7d6464 Fix gitfs symlink handling
In my refactoring to use `go-git`'s `Tree` objects, I missed this edge case (that symlinks get resolved to be relative to the Git root, but our `Tree` object is a subdirectory).
2024-02-22 15:47:41 -08:00
yosifkit ca0647654e
Merge pull request #92 from infosiftr/oci-import-stagefroms
Fix `ArchLastStageFrom` with `oci-import` builder
2024-02-02 16:12:56 -08:00
Tianon Gravi 2ff16d5c5c Fix `ArchLastStageFrom` with `oci-import` builder
Before:

```console
$ bashbrew cat --format '{{ .ArchLastStageFrom arch .TagEntry }}' ubuntu:latest
failed executing template for repo "ubuntu:latest"
template: --format:1:3: executing "--format" at <.ArchLastStageFrom>: error calling ArchLastStageFrom: runtime error: index out of range [-1]
```

After:

```console
$ bashbrew cat --format '{{ .ArchLastStageFrom arch .TagEntry }}' ubuntu:latest
scratch
```
2024-01-30 09:44:14 -08:00
Tianon Gravi 5152c0df68 Bump version to 0.1.12 (post-release) 2024-01-22 11:29:29 -08:00
Tianon Gravi 91633b567d
Merge pull request #91 from infosiftr/sha256sum-test
Add test for sha256sum function
2024-01-22 10:53:01 -08:00
Tianon Gravi b9a5bd8a9c Add test for sha256sum function 2024-01-22 09:46:30 -08:00
Tianon Gravi bc4c23b04c
Merge pull request #90 from infosiftr/sha256sum
Add `sha256sum` template function
2024-01-22 09:43:56 -08:00
Tianon Gravi 1a4c6e83ab Add `sha256sum` template function
This is intentionally named and implemented to match the one in Sprig: https://masterminds.github.io/sprig/crypto.html
2024-01-19 16:42:52 -08:00
Tianon Gravi 0b38175c0a Bump version to 0.1.11 (post-release) 2024-01-18 16:54:16 -08:00
Tianon Gravi 037aff1f1a Add initial GitHub CODEOWNERS 2024-01-12 15:57:17 -08:00
Tianon Gravi 1a2b388f44
Merge pull request #89 from infosiftr/context-checksum
Add `ArchGitChecksum` template command in `bashbrew cat`
2024-01-12 15:55:59 -08:00
Tianon Gravi 795ff4ba45 Add better `ModTime` in `gitfs` and `ArchGitTime` helper (for `SOURCE_DATE_EPOCH`) 2024-01-12 13:13:45 -08:00
Tianon Gravi 2d67127dd1 Add `ArchGitChecksum` template command in `bashbrew cat`
This also finally adds `bashbrew context` as an explicit subcommand so that issues with this code are easier to test/debug (so we can generate the actual tarball and compare it to previous versions of it, versions generated by `git archive`, etc).

As-is, this currently generates verbatim identical checksums to 0cde8de57d/sources.sh (L90-L96) (by design).  We'll wait to do any cache bust there until we implement `Dockerfile`/context filtering:

```console
$ bashbrew cat varnish:stable --format '{{ .TagEntry.GitCommit }} {{ .TagEntry.Directory }}'
0c295b528f28a98650fb2580eab6d34b30b165c4 stable/debian
$ git -C "$BASHBREW_CACHE/git" archive 0c295b528f28a98650fb2580eab6d34b30b165c4:stable/debian/ | ./tar-scrubber | sha256sum
3aef5ac859b23d65dfe5e9f2a47750e9a32852222829cfba762a870c1473fad6
$ bashbrew cat --format '{{ .ArchGitChecksum arch .TagEntry }}' varnish:stable
3aef5ac859b23d65dfe5e9f2a47750e9a32852222829cfba762a870c1473fad6
```

(Choosing `varnish:stable` there because it currently has [some 100% valid dangling symlinks](6b1c6ffedc/stable/debian/scripts) that tripped up my code beautifully 💕)

From a performance perspective (which was the original reason for looking into / implementing this), running the `meta-scripts/sources.sh` script against `--all` vs this, my local system gets ~18.5m vs ~4.5m (faster being this new pure-Go implementation).
2024-01-12 13:13:42 -08:00
Tianon Gravi 4e0ea8d8ab
Merge pull request #86 from LaurentGoderre/sbom-supplier
Add support for package supplier in SBOM
2023-12-08 12:56:59 -08:00
Laurent Goderre 5a86c34c5a Add support for package supplier in SBOM 2023-12-08 14:55:47 -05:00
Tianon Gravi 36b3473420
Merge pull request #88 from infosiftr/docker-push-on-index
Fix fetchRegistryImageIds (which is only used for "docker push" no-op) to no longer return members of an index/manifest list
2023-12-01 10:57:06 -08:00
Tianon Gravi 9a271ea747 Fix fetchRegistryImageIds (which is only used for "docker push" no-op) to no longer return members of an index/manifest list 2023-12-01 10:49:40 -08:00
Tianon Gravi ff6b5f24ed Bump version to 0.1.10 (post-release) 2023-10-26 22:55:28 -07:00
yosifkit 07ad7060aa
Merge pull request #81 from tianon/github-actions-platform
Add "--platform" to GHA generate script
2023-10-25 09:37:26 -07:00
yosifkit a70de23794
Merge pull request #80 from infosiftr/i386-build-context
Update "munge-i386" to add "--build-context" in "docker buildx build" lines
2023-10-24 16:59:06 -07:00
Joseph Ferguson d3dede4ffe Swap the platform flag too 2023-10-24 16:12:28 -07:00
Laurent Goderre a9fce37a00
Merge pull request #85 from LaurentGoderre/jq-template-functions
Added shared module for jq template with SBOM generator
2023-10-03 10:10:44 -04:00
Laurent Goderre 08c926140a Added shared module for jq template with SBOM generator 2023-10-03 09:06:28 -04:00
Tianon Gravi a226be91f5
Merge pull request #83 from docker-library/windows-workflow
Add windows servers to smoke test
2023-09-25 18:12:22 -07:00
Joseph Ferguson c4273aae7c Add windows servers to smoke test
Disable cgo to fix build failure on GHA windows-2022
2023-09-25 16:26:12 -07:00
yosifkit 6334a4f8e8
Merge pull request #82 from tianon/sharedtag-children
Add workaround for "bashbrew children" with SharedTags in FROM/--from=
2023-09-15 15:12:21 -07:00
Tianon Gravi ed668319e9 Add workaround for "bashbrew children" with SharedTags in FROM/--from=
There's some hopefully good code comments describing this better, but essentially this changes the algorithm to have the "first" tag/entry in the SharedTag group be the "owner" of all the shared tags (instead of the following tags clobbering that and them thus being "owned" by the final Windows entry).

Before (finding tags which have both Debian *and* Ubuntu in their parentage):

```console
$ comm -12 <(bashbrew children debian | sort) <(bashbrew children ubuntu | sort) | cut -d: -f1 | sort -u
$ # (empty list, but adding "--arch-filter" makes it work:)
$ comm -12 <(bashbrew children --arch-filter debian | sort) <(bashbrew children --arch-filter ubuntu | sort) | cut -d: -f1 | sort -u
clojure
maven
neo4j
```

After:

```console
$ comm -12 <(bashbrew children debian | sort) <(bashbrew children ubuntu | sort) | cut -d: -f1 | sort -u
clojure
maven
neo4j
```
2023-09-15 09:18:58 -07:00
Tianon Gravi 0e6bdaabd6 Add "--platform" to GHA generate script 2023-09-14 16:17:49 -07:00
Tianon Gravi ca308fd729 Minor tweaks to "bashbrew-arch-to-goenv.sh" comments 2023-07-31 20:57:56 -07:00
Tianon Gravi 678dca2e2a Update "munge-i386" to add "--build-context" in "docker buildx build" lines
Without this, we end up building against the wrong image due to a bug in buildx/buildkit. 😞
2023-07-31 17:03:31 -07:00
Tianon Gravi 2ff90048d9 Add "permissions" to example GHA YAML 2023-07-27 16:40:07 -07:00