-
Notifications
You must be signed in to change notification settings - Fork 7
Fix multi-arch container builds by consolidating build jobs #69
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
Open
alexlovelltroy
wants to merge
13
commits into
main
Choose a base branch
from
alovelltroy/multi-arch-containers
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+34
−60
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1dbe4f2
Fix multi-arch container builds by consolidating build jobs
alexlovelltroy 47b945d
Refactor build command in Dockerfile to handle architecture-specific …
alexlovelltroy 826f1c9
Enhance Dockerfile for multi-arch builds by adding build-essential an…
alexlovelltroy 7b48cb6
Refactor Dockerfile.build to set CC based on target architecture for …
alexlovelltroy ef40a89
Add OCI labels for enhanced container metadata in Dockerfile.build
alexlovelltroy 8c113a3
Update workflow to use specific multi-arch build refinements and enha…
alexlovelltroy 528546d
Fix workflow reference for multi-arch image build in upstream-docker-…
alexlovelltroy 7f84dc2
Remove GoReleaser build instructions from README.md
alexlovelltroy 3b3ec44
Update .github/workflows/upstream-docker-release.yml
alexlovelltroy ee02e7b
Update Dockerfile.build
alexlovelltroy 56f1fa0
Update .github/workflows/upstream-docker-release.yml
alexlovelltroy 2793b30
Update README.md
alexlovelltroy 023d7d2
Update README.md
alexlovelltroy 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
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 |
|---|---|---|
| @@ -1,39 +1,3 @@ | ||
| # Power Control Service(pcs) | ||
| # Power Control Service (pcs) | ||
|
|
||
| This is a fork of the original PCS code from [Cray-HPE/hms-power-control](https://github.com/Cray-HPE/hms-power-control), suitable only for experimentation and demo purposes at this point. | ||
|
|
||
| ## Build/Install with goreleaser | ||
|
|
||
| This project uses [GoReleaser](https://goreleaser.com/) to automate releases and include additional build metadata such as commit info, build time, and versioning. Below is a guide on how to set up and build the project locally using GoReleaser. | ||
|
|
||
| ### Environment Variables | ||
|
|
||
| To include detailed build metadata, ensure the following environment variables are set: | ||
|
|
||
| * __GIT_STATE__: Indicates whether there are uncommitted changes in the working directory. Set to clean if the repository is clean, or dirty if there are uncommitted changes. | ||
| * __BUILD_HOST__: The hostname of the machine where the build is being performed. | ||
| * __GO_VERSION__: The version of Go used for the build. GoReleaser uses this to ensure consistent Go versioning information. | ||
| * __BUILD_USER__: The username of the person or system performing the build. | ||
|
|
||
| Set all the environment variables with: | ||
| ```bash | ||
| export GIT_STATE=$(if git diff-index --quiet HEAD --; then echo 'clean'; else echo 'dirty'; fi) | ||
| export BUILD_HOST=$(hostname) | ||
| export GO_VERSION=$(go version | awk '{print $3}') | ||
| export BUILD_USER=$(whoami) | ||
| ``` | ||
|
|
||
| ### Building Locally with GoReleaser | ||
|
|
||
| Once the environment variables are set, you can build the project locally using GoReleaser in snapshot mode (to avoid publishing). | ||
|
|
||
|
|
||
| Follow the installation instructions from [GoReleaser’s documentation](https://goreleaser.com/install/). | ||
|
|
||
| 1. Run GoReleaser in snapshot mode with the --snapshot flag to create a local build without attempting to release it: | ||
| ```bash | ||
| goreleaser release --snapshot --clean | ||
| ``` | ||
| 2. Check the dist/ directory for the built binaries, which will include the metadata from the environment variables. You can inspect the binary output to confirm that the metadata was correctly embedded. | ||
|
|
||
| __NOTE__ If you see errors, ensure that you are using the same version of goreleaser that is being used in the [Release Action](.github/workflows/Release.yml) | ||
| This is a fork of the original PCS code from [Cray-HPE/hms-power-control](https://github.com/Cray-HPE/hms-power-control). It adds support for Postgres operation. | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't even thing we need to call out postgres, other things have been updated/fixed as well, but this can also be left in ...