Skip to content

Commit

Permalink
update: scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
codekow committed Oct 13, 2023
1 parent 085855a commit 76fc8d2
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ stringData:
return Character;
}());
exports.Character = Character;
},{}],2:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Expand Down Expand Up @@ -284,7 +284,7 @@ stringData:
return Column;
}());
exports.Column = Column;
},{"./character":1}],3:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Expand Down Expand Up @@ -398,7 +398,7 @@ stringData:
dispatchRender(ctx);
}
window.digitalrain = { init: init };
},{"./column":2}]},{},[3]);
/*! Grained.js
* Author : Sarath Saleem - https://github.com/sarathsaleem
Expand Down
26 changes: 14 additions & 12 deletions scripts/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/bin/bash
set -e

# 8 seconds is usually enough time for the average user to realize they foobar
export SLEEP_SECONDS=8

################# standard init #################

check_shell(){
[ -n "$BASH_VERSION" ] && return
echo "Please verify you are running in bash shell"
Expand All @@ -23,27 +28,24 @@ get_script_path(){
echo "SCRIPT_DIR: ${SCRIPT_DIR}"
}


check_shell
check_git_root
get_script_path

################# standard init #################

export SLEEP_SECONDS=8

# shellcheck source=/dev/null
. "${SCRIPT_DIR}/functions.sh"

# # manage args passed to script
# if [ "${1}" == "demo=enter_name_here" ]; then
# export NON_INTERACTIVE=true
# bootstrap_dir=bootstrap/overlays/workshop-rhdp
# ocp_control_nodes_not_schedulable
# ocp_create_machineset_autoscale 0 30
# ocp_scale_machineset 1
# fi
# manage args passed to script
if [ -z ${1+x} ]; then
export NON_INTERACTIVE=true

echo "NON INTERACTIVE MODE"
echo "You are running ${1}"
exit 0

fi

check_bin oc
# check_bin kustomize
Expand Down
9 changes: 9 additions & 0 deletions scripts/library/demos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

demo_default(){
selected=bootstrap/default

ocp_control_nodes_schedulable
local_argocd "${selected}"

}
9 changes: 9 additions & 0 deletions scripts/library/unsorted.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ until_true(){
echo "[OK]"
}

local_argocd(){
if [ ! -f "${1}/kustomization.yaml" ]; then
echo "Please provide a dir with \"kustomization.yaml\""
return
fi

until_true oc apply -k "${1}"
}

select_folder(){
FOLDER="${1:-options}"
PS3="Select by number: "
Expand Down

0 comments on commit 76fc8d2

Please sign in to comment.