parameters: version: type: string default: 1.2.4 steps: - run: name: Install Vault command: | set -x case "${OSTYPE}" in linux*) os="linux" ;; darwin*) os="darwin" ;; msys*) os="windows" ;; *) echo "unknown os: ${OSTYPE}"; exit 1 ;; esac curl -SL --fail -o /tmp/vault.zip https://releases.hashicorp.com/vault/"<< parameters.version >>"/vault_"<< parameters.version >>"_"${os}"_amd64.zip if [[ "${os}" != "windows" ]]; then sudo unzip -d /usr/local/bin /tmp/vault.zip rm -rf /tmp/vault* else rm -rf c:\Windows\vault.exe unzip /tmp/vault.zip -d "/c/Windows" rm -rf /tmp/vault* fi