-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdeploy_feature_samples.sh
More file actions
executable file
·51 lines (38 loc) · 1.44 KB
/
Copy pathdeploy_feature_samples.sh
File metadata and controls
executable file
·51 lines (38 loc) · 1.44 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
# Feature Samples Bundle Deployment
# Sample-specific constants
BUNDLE_NAME="Feature Samples Bundle"
# 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 — single feature schema for the entire bundle
schema="${schema_namespace}_feature${logical_env}"
# Set up bundle environment
setup_bundle_env "$BUNDLE_NAME" "$schema"
# Update substitutions file with catalog and schema namespace
if ! update_substitutions_file "feature-samples/src/pipeline_configs/dev_substitutions.json"; then
log_error "Failed to update substitutions file. Exiting."
exit 1
fi
# Update pipeline global config with table migration state volume path
if ! update_pipeline_global_config_file "feature-samples/src/pipeline_configs/global.json"; then
log_error "Failed to update pipeline global config file. Exiting."
exit 1
fi
# Change to feature-samples directory for deployment
cd feature-samples
# Deploy the bundle
deploy_bundle "$BUNDLE_NAME"
# Return to parent directory
cd ..
# Restore original files
restore_substitutions_file "feature-samples/src/pipeline_configs/dev_substitutions.json"
restore_pipeline_global_config_file "feature-samples/src/pipeline_configs/global.json"