Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 00f39ef9 authored by Fazle Rabbi's avatar Fazle Rabbi 💬
Browse files

delete cache if job is successful

parent 56fc132c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -7,4 +7,9 @@ include:

.deploy:nextcloud-app-by-checkout:
  after_script:
    - rm -rf ${DEPLOYMENT_PATH}/data/rainloop-storage/_data_/_default_/cache/*
    - |
      if [[ cat .job_status == "SUCCESS" ]]
      then
        ssh $SSH_USER@$DEPLOYMENT_HOST "rm -rf /tmp/${CI_JOB_ID} && rm -rf ${DEPLOYMENT_PATH}/data/rainloop-storage/_data_/_default_/cache/*"
      else
        ssh $SSH_USER@$DEPLOYMENT_HOST "rm -rf /tmp/${CI_JOB_ID}"