-
-
Notifications
You must be signed in to change notification settings - Fork 199
feat: source specific version of packer and build with specific go #1735
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 all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c60b436
feat: source specific version of packer and build with specific go
samrose 383b3e0
fix: add package to checks to assure it is tested, built cached prior…
samrose 8930cd4
fix: try to use nix shell to settle permission issue
samrose a3c3591
fix: install packer with nix in profile within workflow
samrose f9638c5
fix: use sudo on packer calls
samrose 6fceca5
fix: trying skip regiona validation for now
samrose f825a9b
fix: use cachix installer with cache config
samrose aca4752
fix: try to fix perms and use non-sudo
samrose 893836e
fix: assure nix version we need is installed at this stage + perm fix
samrose d73fb5f
fix: see how nix was installed on this machine originally
samrose 34497ce
fix: for now keep nix and inherit env
samrose 325faa4
fix: use large-linux-arm here going forward
samrose b0bf927
fix: try remove job level perms
samrose 29f9780
fix: match permissions on ami-release
samrose 91d8b31
tests: debug role
samrose c20a2ff
fix: allows workflow to recv secret when called from other workflows
samrose 9770041
fix: receive the secret as a parameter
samrose 109b062
fix: no need for sudo
samrose 792223e
chore: revert qemu workflow/do not change packer handling there
samrose 4f69e1e
docs: updating deps doc
samrose fa5f66c
chore: tmp suffix to test release
samrose 8889edc
chore: restore versions post testing
samrose 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -294,6 +294,7 @@ | |
wal-g-2 | ||
wal-g-3 | ||
dbmate-tool | ||
packer | ||
pg_regress | ||
; | ||
} | ||
|
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,68 @@ | ||
# Updating Dependencies | ||
|
||
This document explains how to update various dependencies used in the nix configuration. | ||
|
||
## Updating Packer | ||
|
||
Packer is used for creating machine images and is defined in `nix/packages/packer.nix`. | ||
|
||
### Steps to update Packer version: | ||
|
||
1. Create a branch off of `develop` | ||
2. Navigate to `nix/packages/packer.nix` | ||
3. Update the version field: | ||
```nix | ||
version = "1.15.0"; # Update to desired version | ||
``` | ||
4. Update the git revision to match the new version: | ||
```nix | ||
rev = "v${version}"; | ||
``` | ||
5. Temporarily clear the hash to get the new SHA256: | ||
```nix | ||
hash = ""; # Clear this temporarily | ||
``` | ||
6. Save the file and run: | ||
```bash | ||
nix build .#packer | ||
``` | ||
7. Nix will fail and output the correct SHA256 hash. Copy this hash and update the file: | ||
```nix | ||
hash = "sha256-NEWHASHHEREFROMBUILDOUTPUT"; | ||
``` | ||
8. Update the vendorHash if needed. If the build fails due to vendor hash mismatch, temporarily set: | ||
```nix | ||
vendorHash = ""; # Clear this temporarily | ||
``` | ||
9. Run `nix build .#packer` again to get the correct vendorHash, then update: | ||
```nix | ||
vendorHash = "sha256-NEWVENDORHASHHEREFROMBUILDOUTPUT"; | ||
``` | ||
10. Verify the build works: | ||
```bash | ||
nix build .#packer | ||
``` | ||
11. Test the packer binary: | ||
```bash | ||
./result/bin/packer version | ||
``` | ||
12. Run the full test suite to ensure nothing is broken: | ||
```bash | ||
nix flake check -L | ||
``` | ||
13. Commit your changes and create a PR for review | ||
14. Update any CI/CD workflows or documentation that reference the old Packer version | ||
|
||
### Notes: | ||
- Always check the [Packer changelog](https://github.com/hashicorp/packer/releases) for breaking changes | ||
- Packer uses Go, so ensure compatibility with the Go version specified in the flake inputs | ||
- The current Go version is specified in `flake.nix` under `nixpkgs-go124` input | ||
- If updating to a major version, test all packer templates (`.pkr.hcl` files) in the repository | ||
|
||
## Updating Other Dependencies | ||
|
||
Similar patterns can be followed for other dependencies defined in the nix packages. Always: | ||
1. Check for breaking changes in changelogs | ||
2. Update version numbers and hashes | ||
3. Run local tests | ||
4. Verify functionality before creating PR |
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.
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.