Skip to content

Instantly share code, notes, and snippets.

@sboardwell
Last active August 5, 2019 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sboardwell/b12cce8ccff2f7deaa121b045fad8fc0 to your computer and use it in GitHub Desktop.
Save sboardwell/b12cce8ccff2f7deaa121b045fad8fc0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# Execute with:
# ./refresh-jx-platform.sh
# or pass the JX_VERSION
# JX_VERSION=2.3.333 ./refresh-jx-platform.sh
set -eu
export JX_HOME=$(mktemp -d)
if [ -z "${JX_VERSION:-}" ]; then
export JX_VERSION=$(jx version --batch-mode --no-version-check | grep -i 'jenkins x platform' | cut -d' ' -f 4)
fi
[ -n "${JX_VERSION}" ] || { echo "No JX_VERSION found. Exiting..."; exit 1; }
jx upgrade platform --batch-mode --verbose --always-upgrade --version ${JX_VERSION}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment