Created
August 6, 2025 09:22
-
-
Save wuriyanto48/7537fcb48cbd53a86473f2570f91448d to your computer and use it in GitHub Desktop.
CICD Template
This file contains hidden or 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
#!/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