-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix: Add local scripts #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
345731a
fix: Add local script
Techassi a5ff5d0
chore: Replace >> with tee -a
Techassi 76f064a
Merge branch 'main' into fix/add-local-script
Techassi c54c119
chore: Split up README into multiple files
Techassi b5da1a9
Merge branch 'main' into fix/add-local-script
Techassi 522de51
chore: Apply chmod +x to script
Techassi 2600834
chore: Add quotes to GITHUB_ENV env var
Techassi cdc90bb
chore: Add example action input and output values
Techassi e0206ba
chore: Add quotes to GITHUB_OUTPUT env var
Techassi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Get a manifest digest. Example inputs: | ||
| # - docker.stackable.tech/stackable/hello-world:0.0.1-SNAPSHOT-stackable0.0.0-dev | ||
| # - docker.stackable.tech/stackable/hello-world:0.0.1-SNAPSHOT-stackable0.0.0-dev-amd64 | ||
| set -euo pipefail | ||
|
|
||
| # Note: `docker manifest push` currently outputs the same hash, but `manifest` | ||
| # is experimental and the STDOUT is more likely to change than the structured | ||
| # output. | ||
| docker buildx imagetools inspect --format '{{println .Manifest.Digest}}' "$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # `build-container-image` | ||
|
|
||
| > Manifest: [build-container-image/action.yml][build-container-image] | ||
|
|
||
| This action builds a *single* container image using `docker buildx build`. It does the following work: | ||
|
|
||
| 1. Free disk space to avoid running out of disk space during larger builds. | ||
| 2. Build the image using `docker buildx build`, outputting the architecture specific tag. | ||
|
|
||
| This action is considered to be the **single** source of truth regarding the image manifest tag. | ||
| All subsequent tasks must use this value to ensure consistency. | ||
|
|
||
| ## Inputs and Outputs | ||
|
|
||
| > [!TIP] | ||
| > For descriptions of the inputs and outputs, see the complete [build-container-image] action. | ||
|
|
||
| ### Inputs | ||
|
|
||
| - `image-name` (eg: `kafka`) | ||
| - `image-index-manifest-tag` (eg: `3.4.1-stackable0.0.0-dev`) | ||
| - `container-file` (defaults to `Dockerfile`) | ||
| - `build-context` (defaults to `.`) | ||
| <!-- | ||
| TODO (@NickLarsenNZ): Allow optional buildx cache | ||
| - `build-cache-username` | ||
| - `build-cache-password` | ||
| --> | ||
|
|
||
| ### Outputs | ||
|
|
||
| - `image-repository-uri` (eg: `localhost/kafka`) | ||
| - `image-manifest-tag` (eg: `3.4.1-stackable0.0.0-dev-amd64`) | ||
| - `image-manifest-uri` (eg: `localhost/kafka:3.4.1-stackable0.0.0-dev-amd64`) | ||
|
|
||
| [build-container-image]: ./action.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # `build-product-image` | ||
|
|
||
| > Manifest: [build-product-image/action.yml][build-product-image] | ||
|
|
||
| <!-- markdownlint-disable-next-line MD028 --> | ||
| > [!NOTE] | ||
| > The build step is not concerned with registries, ports, paths to repositories, but still requires | ||
| > a name. If the name does not contain a registry, `hub.docker.com` (?) is implied. Therefore, | ||
| > `localhost` will be used as the registry so as to avoid accidental interactions with an unintended | ||
| > registry. | ||
| > | ||
| > Ideally, bake should be refactored to use `localhost` as the registry for the previously mentioned | ||
| > reason (whether or not that is behind some option). | ||
|
|
||
| This action builds a *single* container image using `bake`. It does the following work: | ||
|
|
||
| 1. Free disk space to avoid running out of disk space during larger builds. | ||
| 2. Build the image using `bake` which internally uses `docker buildx`. | ||
| 3. Temporarily retag the image to use `localhost` instead of `docker.stackable.tech/stackable`. | ||
| 4. Produce output values to be used in later steps. | ||
|
|
||
| This action is considered to be the **single** source of truth regarding image index tag and image | ||
| manifest tag. All subsequent tasks must use these values to ensure consistency. | ||
|
|
||
| Currently, bake provides the following ouput in the `bake-target-tags` file: | ||
|
|
||
| ```plain | ||
| docker.stackable.tech/stackable/kafka:3.4.1-stackable0.0.0-dev-amd64 | ||
| ``` | ||
|
|
||
| Until bake supports the ability to specify the registry, this action will retag the image as: | ||
|
|
||
| ```plain | ||
| localhost/kafka:3.4.1-stackable0.0.0-dev-amd64 | ||
| ``` | ||
|
|
||
| ## Inputs and Outputs | ||
|
|
||
| > [!TIP] | ||
| > For descriptions of the inputs and outputs, see the complete [build-product-image] action. | ||
|
|
||
| ### Inputs | ||
|
|
||
| - `product-name` | ||
| - `product-version` | ||
| - `image-tools-version` | ||
| - `build-cache-username` | ||
| - `build-cache-password` | ||
|
|
||
| ### Outputs | ||
|
|
||
| - `image-manifest-tag` | ||
|
Techassi marked this conversation as resolved.
Outdated
|
||
|
|
||
| [build-product-image]: ./action.yml | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.