Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
This commit is contained in:
117
scripts/templates/script-template.sh
Executable file
117
scripts/templates/script-template.sh
Executable file
@@ -0,0 +1,117 @@
|
||||
#!/usr/bin/env bash
|
||||
###############################################################################
|
||||
# Script Name: script-name.sh
|
||||
# Description: Brief description of what the script does
|
||||
# Author: DevOps Team
|
||||
# Created: $(date +%Y-%m-%d)
|
||||
# Last Modified: $(date +%Y-%m-%d)
|
||||
# Version: 1.0.0
|
||||
#
|
||||
# Usage:
|
||||
# ./script-name.sh [options] [arguments]
|
||||
#
|
||||
# Options:
|
||||
# -h, --help Show this help message
|
||||
# -v, --verbose Enable verbose output
|
||||
# -d, --dry-run Perform a dry run without making changes
|
||||
#
|
||||
# Environment Variables:
|
||||
# REQUIRED_VAR Description of required variable
|
||||
# OPTIONAL_VAR Description of optional variable
|
||||
#
|
||||
# Exit Codes:
|
||||
# 0 Success
|
||||
# 1 General error
|
||||
# 2 Invalid arguments
|
||||
# 3 Missing dependencies
|
||||
#
|
||||
# Examples:
|
||||
# ./script-name.sh --verbose
|
||||
# ./script-name.sh --dry-run
|
||||
###############################################################################
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Get script directory
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
|
||||
# Source common libraries
|
||||
source "$SCRIPT_DIR/../lib/init.sh"
|
||||
source "$SCRIPT_DIR/../lib/common/error-handling.sh"
|
||||
|
||||
# Setup error handling
|
||||
setup_error_traps
|
||||
|
||||
# Default values
|
||||
VERBOSE="${VERBOSE:-0}"
|
||||
DRY_RUN="${DRY_RUN:-0}"
|
||||
|
||||
# Parse command line arguments
|
||||
parse_args() {
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
-h|--help)
|
||||
show_help
|
||||
exit 0
|
||||
;;
|
||||
-v|--verbose)
|
||||
VERBOSE=1
|
||||
LOG_LEVEL=$LOG_LEVEL_DEBUG
|
||||
shift
|
||||
;;
|
||||
-d|--dry-run)
|
||||
DRY_RUN=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
log_error "Unknown option: $1"
|
||||
show_help
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# Show help message
|
||||
show_help() {
|
||||
cat <<EOF
|
||||
$(basename "$0") - Brief description
|
||||
|
||||
Usage:
|
||||
$(basename "$0") [options] [arguments]
|
||||
|
||||
Options:
|
||||
-h, --help Show this help message
|
||||
-v, --verbose Enable verbose output
|
||||
-d, --dry-run Perform a dry run without making changes
|
||||
|
||||
Examples:
|
||||
$(basename "$0") --verbose
|
||||
$(basename "$0") --dry-run
|
||||
EOF
|
||||
}
|
||||
|
||||
# Main function
|
||||
main() {
|
||||
log_section "Script Name"
|
||||
|
||||
# Parse arguments
|
||||
parse_args "$@"
|
||||
|
||||
# Validate requirements
|
||||
# validate_required "REQUIRED_VAR"
|
||||
|
||||
# Main logic here
|
||||
log_info "Script execution started"
|
||||
|
||||
if is_dry_run; then
|
||||
log_warn "DRY RUN MODE - No changes will be made"
|
||||
fi
|
||||
|
||||
log_success "Script completed successfully"
|
||||
}
|
||||
|
||||
# Run main function
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user