-
Notifications
You must be signed in to change notification settings - Fork 81
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
change the agent's image and packages for ARM platform #2814
Conversation
/package |
/package |
/package |
/package |
/package |
/package |
/package |
/package |
/package |
.buildkite/scripts/common.sh
Outdated
@@ -21,7 +41,8 @@ add_bin_path() { | |||
with_go() { | |||
echo "Setting up the Go environment..." | |||
create_workspace | |||
retry 5 curl -sL -o ${WORKSPACE}/gvm "https://github.com/andrewkroh/gvm/releases/download/${SETUP_GVM_VERSION}/gvm-linux-amd64" | |||
check_platform_architeture | |||
retry 5 curl -sL -o ${WORKSPACE}/gvm "https://github.com/andrewkroh/gvm/releases/download/${SETUP_GVM_VERSION}/gvm-${platform_type,,}-${arch_type}" |
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 think there is a typo, similar to the other places that you use the variable
retry 5 curl -sL -o ${WORKSPACE}/gvm "https://github.com/andrewkroh/gvm/releases/download/${SETUP_GVM_VERSION}/gvm-${platform_type,,}-${arch_type}" | |
retry 5 curl -sL -o ${WORKSPACE}/gvm "https://github.com/andrewkroh/gvm/releases/download/${SETUP_GVM_VERSION}/gvm-${platform_type}-${arch_type}" |
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, it doesn't a typo, this helps to transform the output of the variable ${platform_type} to lower case:
Example:
platform=$(uname)
echo "${platform}"
echo "${platform,,}"
output:
Linux
linux
.buildkite/scripts/common.sh
Outdated
local platform_type=$(uname) | ||
local hw_type=$(uname -m) |
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.
These are defined at global level. Could those be used instead of getting again the values here ?
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 thought about it, and I didn't find the correct answer. On one side these variables are used inside multiple functions, which means they are global, also, we shouldn't define these variables a lot of times. On another side, if we want to have self-sufficient functions we have to define them inside the functions. Where is the balance? WDYT @mrodm ?
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.
In this case, I would suggest using the global variables.
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.
Currently I would also suggest to use global variables 👍
Co-authored-by: Mario Rodriguez Molins <[email protected]>
Co-authored-by: Mario Rodriguez Molins <[email protected]>
Co-authored-by: Mario Rodriguez Molins <[email protected]>
/package |
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.
LGTM
What is the problem this PR solves?
the issue with ARM agent: https://buildkite.com/elastic/fleet-server-package-mbp/builds/213#_
How does this PR solve the problem?
use
imagePrefix
instead ofimage
int the agent's configadd
instanceType
add the checking of the OS type
How to test this PR locally
Related issues
#2517