-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdeploy_silver.sh
More file actions
executable file
·51 lines (39 loc) · 1.35 KB
/
deploy_silver.sh
File metadata and controls
executable file
·51 lines (39 loc) · 1.35 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
# Silver Sample Bundle Deployment
# Sample-specific constants
BUNDLE_NAME="Silver Sample Bundle"
SCHEMA="${DEFAULT_SCHEMA_NAMESPACE}_silver"
# Source common library and configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/common.sh"
# Parse command-line arguments
parse_common_args "$@"
# Prompt for missing parameters
prompt_common_params
# Validate all required parameters
if ! validate_required_params; then
exit 1
fi
# Set schema - use command line if provided, otherwise use constant with logical environment
if [[ -n "$schema_namespace" ]]; then
# Use schema from command line
schema="${schema_namespace}_silver$logical_env"
else
# Use schema constant with logical environment
schema="$SCHEMA$logical_env"
fi
# Set up bundle environment
setup_bundle_env "$BUNDLE_NAME" "$schema"
# Update substitutions file with catalog and schema namespace
if ! update_substitutions_file "silver_sample/src/pipeline_configs/dev_substitutions.json"; then
log_error "Failed to update substitutions file. Exiting."
exit 1
fi
# Change to silver_sample directory for deployment
cd silver_sample
# Deploy the bundle
deploy_bundle "$BUNDLE_NAME"
# Return to parent directory
cd ..
# Restore original substitutions file
restore_substitutions_file "silver_sample/src/pipeline_configs/dev_substitutions.json"