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