From b0eae9392def5da55dbe812782668a03299a6d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hrachovina?= Date: Thu, 28 Nov 2024 11:20:05 +0100 Subject: [PATCH] Add .drone.yml --- .drone.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..6e380f3 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,38 @@ +kind: pipeline +name: test-delete-trash + +steps: + - name: Set up environment + image: ubuntu:latest + commands: + - apt-get update + - apt-get install -y bash findutils + + - name: Create test data + image: ubuntu:latest + commands: + - mkdir -p /tmp/testdir + - mkdir -p /tmp/testdir/.Trash-1000 + - mkdir -p /tmp/testdir/subfolder/.Trash-1000 + - echo "Test file" > /tmp/testdir/.Trash-1000/testfile.txt + - echo "Test file" > /tmp/testdir/subfolder/.Trash-1000/testfile2.txt + - ls -R /tmp/testdir # List created directories to verify creation + + - name: Run delete_Trash-1000.sh + image: ubuntu:latest + environment: + FOLDER_PATH: /tmp/testdir + commands: + - chmod +x ./delete_Trash-1000.sh + - ./delete_Trash-1000.sh $FOLDER_PATH + + - name: Verify deletion + image: ubuntu:latest + commands: + - echo "Verifying deletion..." + - ls -R /tmp/testdir # Should not contain .Trash-1000 directories anymore + + - name: Cleanup + image: ubuntu:latest + commands: + - rm -rf /tmp/testdir