-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
User visible changes in Makefile targets deploying service components: - cs.deploy becomes cluster-service.deploy - rp.frontend.deploy becomes frontend.deploy - rp.backend.deploy becomes backend.deploy - hypershift.deploy becomes hypershiftoperator.deploy - maestro target no longer exists - deploy.svc.all becomes svc.deployall (the same goes with mgmt target) - deploy.all becomes just deployall So that: - all targets deploying single service ends with .deploy and use the service name matching the component directory name - all targets deploying all services ends with deployall
- Loading branch information
Showing
3 changed files
with
64 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# bash will report what is happening and stop in case of non zero return code | ||
set -xe | ||
|
||
# deploy a service to a cluster | ||
# ./svc-deploy <deploy-env> <dir> <cluster> [target] | ||
# this script expects the <dir> to contain a Makefile that takes care | ||
# of processing any config.mk template on its own | ||
|
||
cd $(dirname "$(realpath "${BASH_SOURCE[0]}")") || exit | ||
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")" | ||
|
||
export DEPLOY_ENV=$1 | ||
export DIR=$2 | ||
export CLUSTER=$3 | ||
export TARGET=${4:-deploy} | ||
|
||
if [[ "$CLUSTER" != "svc" && "$CLUSTER" != "mgmt" ]]; then | ||
echo "Error: CLUSTER must be either 'svc' or 'mgmt'." | ||
if [[ "${CLUSTER}" != "svc" && "${CLUSTER}" != "mgmt" ]]; then | ||
echo "Error: CLUSTER must be either 'svc' or 'mgmt'." >&2 | ||
exit 1 | ||
fi | ||
|
||
export KUBECONFIG=$(cd dev-infrastructure || exit ; make --no-print-directory $CLUSTER.aks.kubeconfigfile) | ||
cd dev-infrastructure | ||
KUBECONFIG=$(make --no-print-directory "${CLUSTER}.aks.kubeconfigfile") | ||
export KUBECONFIG | ||
cd - | ||
|
||
cd ${DIR} || exit | ||
make $TARGET | ||
cd "${DIR}" | ||
make "${TARGET}" |