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

Commit 323cb9cf authored by Arnau Vàzquez's avatar Arnau Vàzquez
Browse files

Merge branch 'gitlab-deployments' into 'master'

Allow deploying from master, overriding branch

See merge request e/infra/nextcloud-theme!52
parents ac9ebcb5 f74e0e7d
Loading
Loading
Loading
Loading
+22 −1
Original line number Diff line number Diff line
@@ -18,24 +18,45 @@ stages:
    - apt-get update && apt-get install -y openssh-client
  script:
    - echo "Deploying to $CI_ENVIRONMENT_NAME ($DEPLOYMENT_HOST)"
    - ssh $SSH_USER@$DEPLOYMENT_HOST "git clone --depth 1 $CI_REPOSITORY_URL --branch $CI_COMMIT_BRANCH --single-branch /tmp/${CI_JOB_ID}/eCloud && sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/eCloud ${DEPLOYMENT_PATH}/html/themes/ && rm -rf /tmp/${CI_JOB_ID}"
    - ssh $SSH_USER@$DEPLOYMENT_HOST "git clone --depth 1 $CI_REPOSITORY_URL --branch $DEPLOYMENT_BRANCH --single-branch /tmp/${CI_JOB_ID}/eCloud && sudo rsync -avzh --chown www-data:www-data --delete --exclude '.git*' /tmp/${CI_JOB_ID}/eCloud ${DEPLOYMENT_PATH}/html/themes/ && rm -rf /tmp/${CI_JOB_ID} && docker exec -u www-data $CONTAINER_NAME /var/www/html/occ maintenance:theme:update"

deploy:dev01:
  extends: .deploy:theme
  only:
    - master
    - main
    - production
  environment:
    name: dev/01
    url: https://dev.eeo.one/
  variables:
    DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH
    CONTAINER_NAME: dev01_nextcloud

deploy:dev02:
  extends: .deploy:theme
  when: manual
  only:
    - master
    - main
    - production
  environment:
    name: dev/02
    url: https://ecloud02.dev.eeo.one
  variables:
    DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH
    CONTAINER_NAME: dev02_nextcloud

deploy:dev03:
  extends: .deploy:theme
  when: manual
  only:
    - master
    - main
    - production
  environment:
    name: dev/03
    url: https://ecloud03.dev.eeo.one
  variables:
    DEPLOYMENT_BRANCH: $CI_COMMIT_BRANCH
    CONTAINER_NAME: dev03_nextcloud