forked from kata-containers/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_openshift.sh
executable file
·34 lines (27 loc) · 1.03 KB
/
install_openshift.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# Copyright (c) 2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
set -e
cidir=$(dirname "$0")
source /etc/os-release || source /usr/lib/os-release
source "${cidir}/lib.sh"
if [ "$ID" != "fedora" ] && [ "$CI" == true ]; then
echo "Skip Openshift Installation on $ID"
echo "CI only runs openshift tests on fedora"
exit
fi
openshift_origin_version=$(get_version "externals.openshift.version")
openshift_origin_commit=$(get_version "externals.openshift.commit")
echo "Install Openshift Origin"
openshift_repo="github.com/openshift/origin"
openshift_tarball="openshift-origin-server-${openshift_origin_version}-${openshift_origin_commit}-linux-64bit.tar.gz"
openshift_dir="${openshift_tarball/.tar.gz/}"
openshift_url="https://${openshift_repo}/releases/download/${openshift_origin_version}/${openshift_tarball}"
curl -L -O "$openshift_url"
tar -xf "$openshift_tarball"
sudo install ${openshift_dir}/{openshift,oc,oadm} /usr/bin
rm -rf "$openshift_dir" "${openshift_tarball}"
echo "Openshift installed successfully"