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

Commit 523518ba authored by Arnau Vàzquez's avatar Arnau Vàzquez
Browse files

Merge branch 'dev/rainloop-suggestions-fix' into 'ecloud-main'

Rainloop suggestions fix + deployments

See merge request e/infra/selfhost/nextcloud-apps/rainloop-nextcloud!8
parents ddece71a 8a810d8c
Loading
Loading
Loading
Loading

.gitlab-ci.yml

0 → 100644
+44 −0
Original line number Diff line number Diff line
stages:
    - deploy

.deploy:nextcloud-app:
    image: ubuntu:focal
    stage: deploy
    before_script: 
      - mkdir $HOME/.ssh
      - chmod 700 ~/.ssh
      - echo "$SSH_PRIVATE_KEY_ED" > $HOME/.ssh/id_ed25519
      - echo "$SSH_PUBKEY_ED" > $HOME/.ssh/id_ed25519.pub
      - echo "$SSH_KNOWN_HOSTS" > $HOME/.ssh/known_hosts
      - chmod 600 ~/.ssh/id_ed25519
      - chmod 644 ~/.ssh/known_hosts ~/.ssh/id_ed25519.pub
      - apt-get update && apt-get install -y openssh-client rsync
    script:
    - echo "Deploying to $CI_ENVIRONMENT_NAME ($DEPLOYMENT_HOST)"
    - ssh $SSH_USER@$DEPLOYMENT_HOST "git clone --depth 1 $CI_REPOSITORY_URL --branch $DEPLOYMENT_BRANCH --single-branch /tmp/${CI_JOB_ID}/rainloop && sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/rainloop ${DEPLOYMENT_PATH}/html/custom_apps/ && rm -rf /tmp/${CI_JOB_ID} && rm -rf ${DEPLOYMENT_PATH}/data/rainloop-storage/_data_/_default_/cache/*"

deploy:dev01:
    extends: .deploy:nextcloud-app
    when: manual
    only:
      - /^dev\/.*$/
    environment:
      name: dev/01
      url: https://dev.eeo.one/
    variables:
      DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH
      CONTAINER_NAME: dev01_nextcloud

deploy:staging:
  extends: .deploy:nextcloud-app
  when: manual
  only:
    - production
    - ecloud-main
  environment:
    name: staging/01
    url: https://eeo.one
  variables:
    DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH
    CONTAINER_NAME: nextcloud
+5 −0
Original line number Diff line number Diff line
@@ -61,6 +61,11 @@ class OwnCloudSuggestions implements \RainLoop\Providers\Suggestions\ISuggestion
						break;
					}

					// Skip System users
					if (isset($aContact['isLocalSystemBook']) && $aContact['isLocalSystemBook']) {
						continue;
					}

					$sUid = empty($aContact['UID']) ? '' : $aContact['UID'];
					if (!empty($sUid))
					{