Skip to content

Commit

Permalink
Be more smart with the development and release target detection
Browse files Browse the repository at this point in the history
  • Loading branch information
rmohr committed Mar 23, 2018
1 parent 0a7e4ee commit 9558246
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion automation/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set -ex

export WORKSPACE="${WORKSPACE:-$PWD}"

if [ "$TARGET" = "openshift-release" ]; then
if [[ $TARGET =~ openshift-.* ]]; then
export PROVIDER="os-3.9.0-alpha.4"
else
export PROVIDER="k8s-1.9.3"
Expand Down
6 changes: 3 additions & 3 deletions cluster/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ source hack/config.sh
echo "Deploying ..."

# Deploy the right manifests for the right target
if [ -z "$TARGET" ] || [ "$TARGET" = "vagrant-dev" ] || [ "$TARGET" = "kubernetes-dev" ] ; then
if [[ -z "$TARGET" ]] || [[ TARGET =~ .*-dev ]]; then
_kubectl create -f ${MANIFESTS_OUT_DIR}/dev -R $i
elif [ "$TARGET" = "vagrant-release" ] || [ "$TARGET" = "openshift-release" ] || [ "$TARGET" = "kubernetes-release" ] ; then
elif [[ $TARGET =~ .*-release ]]; then
for manifest in ${MANIFESTS_OUT_DIR}/release/*; do
if [[ $manifest =~ .*demo.* ]]; then
continue
Expand All @@ -40,7 +40,7 @@ fi
# Deploy additional infra for testing
_kubectl create -f ${MANIFESTS_OUT_DIR}/testing -R $i

if [ "$PROVIDER" = "vagrant-openshift" ] || [ "$PROVIDER" = "os-3.9.0-alpha.4" ] ; then
if [ "$PROVIDER" = "vagrant-openshift" ] || [ "$PROVIDER" = "os-3.9.0-alpha.4" ]; then
_kubectl adm policy add-scc-to-user privileged -z kubevirt-controller -n ${namespace}
_kubectl adm policy add-scc-to-user privileged -z kubevirt-testing -n ${namespace}
_kubectl adm policy add-scc-to-user privileged -z kubevirt-privileged -n ${namespace}
Expand Down

0 comments on commit 9558246

Please sign in to comment.