-
Notifications
You must be signed in to change notification settings - Fork 208
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
build: add support to build linux/mac arm64 #1658
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/usr/bin/env bash | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of duplicating scripts for each os+arch, since I think the only difference is the arch name, I'd like for us to look at using |
||
set -xeuo pipefail | ||
|
||
# Installs the porter CLI for a single user. | ||
# PORTER_HOME: Location where Porter is installed (defaults to ~/.porter). | ||
# PORTER_MIRROR: Base URL where Porter assets, such as binaries and atom feeds, are downloaded. This lets you | ||
# setup an internal mirror. | ||
# PORTER_PERMALINK: The version of Porter to install, such as vX.Y.Z, latest or canary. | ||
# PKG_PERMALINK: The version of mixins and plugins to install, such as latest or canary. | ||
|
||
export PORTER_HOME=${PORTER_HOME:-~/.porter} | ||
export PORTER_MIRROR=${PORTER_MIRROR:-https://cdn.porter.sh} | ||
PORTER_PERMALINK=${PORTER_PERMALINK:-latest} | ||
PKG_PERMALINK=${PKG_PERMALINK:-latest} | ||
|
||
echo "Installing porter@$PORTER_PERMALINK to $PORTER_HOME from $PORTER_MIRROR" | ||
|
||
mkdir -p $PORTER_HOME/runtimes | ||
|
||
curl -fsSLo $PORTER_HOME/porter $PORTER_MIRROR/$PORTER_PERMALINK/porter-linux-arm64 | ||
chmod +x $PORTER_HOME/porter | ||
cp $PORTER_HOME/porter $PORTER_HOME/runtimes/porter-runtime | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you tested out using porter-linux-arm64 installed to ~/.porter/runtimes/porter-runtime? Like built a bundle and run it? I'm not sure that will work without further changes because we build bundles with a linux amd64 invocation image. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sorry for the delay to reply. No, but I will test, just need to setup a linux-arm64 machine, thanks for the review and feedback! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just checking if you tried this out yet and how it went? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @carolynvs sorry :( i was busy with company work and did not have time, I will take some days off and when I comeback i will get this back on track. I will be out starting today till next Tuesday and on Wednesday I will run all the tests on this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need to apologize! I just ping issues after it's been a while to see how things are going and make sure that people aren't stuck. Take your time and I appreciate you looking into this. 👍 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. published the
which I did not publish to check if will download the right one but my question is (I'm a newbie here, so apolagises) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. made the change and then when I run it again apparently it works
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ahh! we will need to build the other mixins for the others like kubernetes/helm ... I get it now sorry doing some rubber duck here :) if this is something we want, I'm willing to open the changes in the other repos There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes that would be great! 💯 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, will work on those things 😃 |
||
echo Installed `$PORTER_HOME/porter version` | ||
|
||
$PORTER_HOME/porter mixin install exec --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install kubernetes --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install helm --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install arm --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install terraform --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install az --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install aws --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install gcloud --version $PKG_PERMALINK | ||
|
||
$PORTER_HOME/porter plugin install azure --version $PKG_PERMALINK | ||
|
||
echo "Installation complete." | ||
echo "Add porter to your path by adding the following line to your ~/.profile and open a new terminal:" | ||
echo "export PATH=\$PATH:~/.porter" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
set -xeuo pipefail | ||
|
||
# Installs the porter CLI for a single user. | ||
# PORTER_HOME: Location where Porter is installed (defaults to ~/.porter). | ||
# PORTER_MIRROR: Base URL where Porter assets, such as binaries and atom feeds, are downloaded. This lets you | ||
# setup an internal mirror. | ||
# PORTER_PERMALINK: The version of Porter to install, such as vX.Y.Z, latest or canary. | ||
# PKG_PERMALINK: The version of mixins and plugins to install, such as latest or canary. | ||
|
||
export PORTER_HOME=${PORTER_HOME:-~/.porter} | ||
export PORTER_MIRROR=${PORTER_MIRROR:-https://cdn.porter.sh} | ||
PORTER_PERMALINK=${PORTER_PERMALINK:-latest} | ||
PKG_PERMALINK=${PKG_PERMALINK:-latest} | ||
|
||
echo "Installing porter@$PORTER_PERMALINK to $PORTER_HOME from $PORTER_MIRROR" | ||
|
||
mkdir -p $PORTER_HOME/runtimes | ||
|
||
curl -fsSLo $PORTER_HOME/porter $PORTER_MIRROR/$PORTER_PERMALINK/porter-darwin-arm64 | ||
curl -fsSLo $PORTER_HOME/runtimes/porter-runtime $PORTER_MIRROR/$PORTER_PERMALINK/porter-linux-arm64 | ||
chmod +x $PORTER_HOME/porter | ||
chmod +x $PORTER_HOME/runtimes/porter-runtime | ||
echo Installed `$PORTER_HOME/porter version` | ||
|
||
$PORTER_HOME/porter mixin install exec --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install kubernetes --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install helm --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install arm --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install terraform --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install az --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install aws --version $PKG_PERMALINK | ||
$PORTER_HOME/porter mixin install gcloud --version $PKG_PERMALINK | ||
|
||
$PORTER_HOME/porter plugin install azure --version $PKG_PERMALINK | ||
|
||
echo "Installation complete." | ||
echo "Add porter to your path by adding the following line to your ~/.bash_profile or ~/.zprofile and open a new terminal:" | ||
echo "export PATH=\$PATH:~/.porter" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
export PATH=$PATH:~/.porter | ||
|
||
PORTER_PERMALINK=canary ./scripts/install/install-linux-arm64.sh | ||
porter list | ||
|
||
PORTER_PERMALINK=v0.23.0-beta.1 ./scripts/install/install-linux-arm64.sh | ||
porter version | grep v0.23.0-beta.1 | ||
|
||
PORTER_PERMALINK=latest ./scripts/install/install-linux-arm64.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
export PATH=$PATH:~/.porter | ||
|
||
PORTER_PERMALINK=canary ./scripts/install/install-mac-arm64.sh | ||
porter list | ||
|
||
PORTER_PERMALINK=v0.23.0-beta.1 ./scripts/install/install-mac-arm64.sh | ||
porter version | grep v0.23.0-beta.1 | ||
|
||
PORTER_PERMALINK=latest ./scripts/install/install-mac-arm64.sh |
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 Go 1.17 we should be able to remove this skip here. Can you add a comment about that and link to the issue for Go windows/arm64 support? That way we are more likely to remember. 😀
golang/go#36439