diff --git a/ci_cd/lab1.yml b/ci_cd/lab1.yml index a2a4145132442b224bfddf609c1e0e3199c70912..c2bfe249ffa0c0d851238e5b6d7631d74f100272 100644 --- a/ci_cd/lab1.yml +++ b/ci_cd/lab1.yml @@ -2,6 +2,21 @@ prebuild_lab_1: stage: lab1 script: + - | + # Check if lab0.cpp exists + if [ ! -f "lab1.cpp" ]; then + echo "lab1.cpp does not exist"; + exit 1; + fi + + # Check if lab0.cpp has been merged into master + git fetch origin master # Fetch the latest master branch + if git ls-tree -r origin/master --name-only | grep -q 'lab0.cpp'; then + echo "Lab 0 complete"; + else + echo "Please have lab 0 merged first"; + exit 1; + fi - git clone https://agile.bu.edu/gitlab/configs/ec327/lab-configs/current.git base_1 artifacts: paths: