Skip to content

Instantly share code, notes, and snippets.

@haysclark
Last active July 1, 2019 22:04
Show Gist options
  • Save haysclark/ec9b0e6e80efb49db49ffa6927ff063f to your computer and use it in GitHub Desktop.
Save haysclark/ec9b0e6e80efb49db49ffa6927ff063f to your computer and use it in GitHub Desktop.
Shell script for install the latest version of Jenkins-X in Google Shell
#!/bin/bash
# jx
pushd /tmp/
curl -s https://api.github.com/repos/jenkins-x/jx/releases/latest \
| grep browser_download_url \
| grep linux-amd64 \
| cut -d '"' -f 4 \
| wget -qi -
tarball="$(find . -name "*linux-amd64.tar.gz")"
tar -xzf $tarball
chmod +x jx
sudo mv jx /usr/local/bin/
popd
location="$(which jx)"
echo "Jenkins-X binary location: $location"
version="$(jx --version)"
echo "Jenkin-X binary version: $version"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment