-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add configuration to specify where brew is installed #60
Add configuration to specify where brew is installed #60
Conversation
Since brew uses different default install locations for Intel and ARM processors we need to be able to configure where it is installed. This PR removes all references to the Intel default `/usr/local` and replaces that with the new parameter.
Sorry but I can't figure out your workflow. I've run I tried to run Would you mind pointing me in the right direction of how I would go about making CI happy without running |
Hello @bombsimon. Could you provide some more details of the exact errors that you are encountering. From your description above I am currently not entirely sure of the level at which the errors occur. 🙂 |
The sean@sean-mac-c02xv3a8jgh6 ~/src/ansible-buildkite-agent (develop) $ gh pr checkout 60
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Total 8 (delta 5), reused 8 (delta 5), pack-reused 0
Unpacking objects: 100% (8/8), done.
From github.com:improbable-eng/ansible-buildkite-agent
* [new ref] refs/pull/60/head -> brew-path-configurable
Switched to branch 'brew-path-configurable'
sean@sean-mac-c02xv3a8jgh6 ~/src/ansible-buildkite-agent (brew-path-configurable) $ git status
On branch brew-path-configurable
nothing to commit, working tree clean
sean@sean-mac-c02xv3a8jgh6 ~/src/ansible-buildkite-agent (brew-path-configurable) $ workflow/ci.sh
Running pre-commit, incrementally. (You can supply pre-commit flags to this script)...
yamllint.................................................................Failed
- hook id: yamllint
- exit code: 1
<SNIP verbose messages>
Format YAML files........................................................Failed
- hook id: yamlfmt
- files were modified by this hook
defaults/main.yml Done
handlers/main.yml Done
Check for added large files..............................................Passed
check BOM - deprecated: use fix-byte-order-marker........................Passed
Check for case conflicts.................................................Passed
Check that executables have shebangs.................(no files to check)Skipped
Check JSON...........................................(no files to check)Skipped
Check for merge conflicts................................................Passed
Check for broken symlinks............................(no files to check)Skipped
Detect Private Key.......................................................Passed
Fix End of Files.........................................................Passed
Forbid new submodules....................................................Passed
Mixed line ending........................................................Passed
Pretty format JSON...................................(no files to check)Skipped
Sort simple YAML files...............................(no files to check)Skipped
Trim Trailing Whitespace.................................................Passed
Forbid binaries......................................(no files to check)Skipped
Test shell scripts with shellcheck...................(no files to check)Skipped
Check shell style with shfmt.........................(no files to check)Skipped
Ansible-lint.............................................................Passed
panic: uncaught error
Traceback (most recent call first):
at workflow/incremental-pre-commit.sh:6 in main()
pre-commit run --from-ref "origin/develop" --to-ref "HEAD" "${@}" exited 1
panic: uncaught error
Traceback (most recent call first):
at workflow/ci.sh:5 in main()
workflow/incremental-pre-commit.sh exited 1
sean@sean-mac-c02xv3a8jgh6 ~/src/ansible-buildkite-agent (brew-path-configurable) $ git status
On branch brew-path-configurable
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: defaults/main.yml
modified: handlers/main.yml
no changes added to commit (use "git add" and/or "git commit -a") If you give that a try, does the script make the edits for you? |
This comment has been minimized.
This comment has been minimized.
@DoomGerbil Ohh, alright, it does not. I think my environment might not be fully OK then. I had some issues installing the required EDIT: Yeah, this is the result for panic: uncaught error
Traceback (most recent call first):
at workflow/incremental-pre-commit.sh:6 in main()
pre-commit run --from-ref "origin/develop" --to-ref "HEAD" "${@}" exited 1
panic: uncaught error
Traceback (most recent call first):
at ./workflow/ci.sh:5 in main()
workflow/incremental-pre-commit.sh exited 1 |
Ah, I think I see an issue. The Thus, the |
I got the desired ❯ pre-commit run --from-ref "origin/develop" --to-ref "HEAD" I no longer get warnings from I committed and pushed the formatted changes but not sure what to do about linting? |
@bombsimon I've just opened #61 to fix all of these lint issues and adjust our lint config a bit. We'll get that merged in, and then you can rebase on the updated |
Regarding the actual content of the PR I would suggest to also define the default values for the new ansible variable as this would otherwise constitute a breaking change. 🙁 |
Ok, the lint fixes have been merged - give it a rebase now, and you should have far fewer issues to deal with 😂 . Thanks! |
Hmm, is this true even if I specify it in |
Yeah, I believe that you're right, and this should be OK as is. Just want to confirm with @Helcaraxan that I'm not missing something else, but this LGTM. |
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.
No. @DoomGerbil is entirely right. This is on me. I had misread the PR and zapped past the point where you set that default. My apologies!
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.
Cool - approving and merging now. 👍
@bombsimon You can reference this change at SHA 4bdfaaf to try it out if you like, but I'll cut a 4.1.0 tag today to get this into a proper release version. |
Awesome, thank you so much! Really appreciated! |
Since brew uses different default install locations for Intel and ARM
processors we need to be able to configure where it is installed. This
PR removes all references to the Intel default
/usr/local
and replacesthat with the new parameter.
Changes
buildkite_agent_brew_dir
to set wherebrew
is installed.Verification
Installed
brew
in/opt/homebrew
and setbuildkite_agent_brew_dir
to this path then ran the playbook.