Add pipeline.sh
Build Project / build (push) Failing after 12s Details
Test Runner / test (push) Successful in 3s Details

This commit is contained in:
m.marjorie 2025-04-04 10:12:21 +08:00
parent 9d59838217
commit 1727e65fdd
3 changed files with 18 additions and 0 deletions

4
sample/build.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
echo "Building..."
sleep 2
echo "Done"

8
sample/pipeline.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
echo "CI: Building..."
./build.sh
echo "CI: Testing..."
./test.sh || { echo "Tests failed"; exit 1; }
echo "CD: Deploying..."
cp build.sh ../deployed-script.sh
echo "Deployed!"

6
sample/test.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
if [ 1 -eq 1 ]; then
echo "Test passed"
else
exit 1
fi