Skip to content

Instantly share code, notes, and snippets.

@wuriyanto48
Created August 6, 2025 09:22
Show Gist options
  • Save wuriyanto48/7537fcb48cbd53a86473f2570f91448d to your computer and use it in GitHub Desktop.
Save wuriyanto48/7537fcb48cbd53a86473f2570f91448d to your computer and use it in GitHub Desktop.
CICD Template
#!/bin/bash
set -e
function checkout_code() {
echo "πŸ“₯ [Checkout] Mengambil source code dari repository..."
sleep 1
}
function install_dependencies() {
echo "πŸ“¦ [Install] Menginstal dependensi project..."
sleep 1
}
function run_linter() {
echo "🧹 [Lint] Mengecek kode dengan linter..."
sleep 1
}
function run_tests() {
echo "πŸ§ͺ [Test] Menjalankan unit tests..."
sleep 1
}
function build_project() {
echo "πŸ—οΈ [Build] Membangun project..."
sleep 1
}
function deploy_to_staging() {
echo "πŸš€ [Deploy] Men-deploy ke lingkungan staging..."
sleep 1
}
function run_integration_tests() {
echo "πŸ”— [Integration Test] Menjalankan integration tests..."
sleep 1
}
function deploy_to_production() {
echo "πŸš€ [Deploy] Men-deploy ke lingkungan production..."
sleep 1
}
function notify() {
echo "πŸ“’ [Notify] Mengirim notifikasi ke tim..."
sleep 1
}
function main() {
echo "===== Simulasi CI/CD Dimulai ====="
checkout_code
install_dependencies
run_linter
run_tests
build_project
deploy_to_staging
run_integration_tests
deploy_to_production
notify
echo "===== Simulasi CI/CD Selesai ====="
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment