Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the viewer standalone #271

Merged
merged 6 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .babelrc.js

This file was deleted.

347 changes: 6 additions & 341 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ name: cypress-e2e-testing master
services:
# nextcloud server
- name: server
image: nextcloudci/server:server-10
image: nextcloudci/server:server-16
commands:
# Add app sources to the app directory
- export BRANCH=$DRONE_TARGET_BRANCH
Expand All @@ -37,7 +37,7 @@ services:
- chown -R www-data:www-data /var/www/html/data

# Install nextcloud, watch logs and run apache
- bash /initnc.sh
- bash /usr/local/bin/initAndRun.sh

steps:
# clone and build the app
Expand All @@ -57,181 +57,13 @@ steps:
- name: wait-on-server
image: nextcloudci/node:node-5
environment:
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- WAIT_ON=$CYPRESS_baseUrl$LOGIN
- npm install -g wait-on
- wait-on -i 500 -t 300000 $WAIT_ON

- name: testing 1
image: cypress/browsers:chrome69
depends_on:
- build
- wait-on-server
# avoid memory process crash
# https://docs.cypress.io/guides/references/error-messages.html#The-Chromium-Renderer-process-just-crashed
resources:
limits:
cpu: 3
memory: 800Mi
requests:
cpu: 0.5
memory: 500Mi
volumes:
- name: cache
path: /root/.cache
- name: droneshm
path: /dev/shm
environment:
CYPRESS_RECORD_TOKEN:
from_secret: cypress_record_token
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- cd /drone/src
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_TOKEN --parallel --ci-build-id ci-$DRONE_BUILD_NUMBER-master

- name: testing 2
image: cypress/browsers:chrome69
depends_on:
- build
- wait-on-server
# avoid memory process crash
# https://docs.cypress.io/guides/references/error-messages.html#The-Chromium-Renderer-process-just-crashed
resources:
limits:
cpu: 3
memory: 800Mi
requests:
cpu: 0.5
memory: 500Mi
volumes:
- name: cache
path: /root/.cache
- name: droneshm
path: /dev/shm
environment:
CYPRESS_RECORD_TOKEN:
from_secret: cypress_record_token
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- cd /drone/src
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_TOKEN --parallel --ci-build-id ci-$DRONE_BUILD_NUMBER-master

- name: testing 3
image: cypress/browsers:chrome69
depends_on:
- build
- wait-on-server
# avoid memory process crash
# https://docs.cypress.io/guides/references/error-messages.html#The-Chromium-Renderer-process-just-crashed
resources:
limits:
cpu: 3
memory: 800Mi
requests:
cpu: 0.5
memory: 500Mi
volumes:
- name: cache
path: /root/.cache
- name: droneshm
path: /dev/shm
environment:
CYPRESS_RECORD_TOKEN:
from_secret: cypress_record_token
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- cd /drone/src
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_TOKEN --parallel --ci-build-id ci-$DRONE_BUILD_NUMBER-master

- name: testing 4
image: cypress/browsers:chrome69
depends_on:
- build
- wait-on-server
# avoid memory process crash
# https://docs.cypress.io/guides/references/error-messages.html#The-Chromium-Renderer-process-just-crashed
resources:
limits:
cpu: 3
memory: 800Mi
requests:
cpu: 0.5
memory: 500Mi
volumes:
- name: cache
path: /root/.cache
- name: droneshm
path: /dev/shm
environment:
CYPRESS_RECORD_TOKEN:
from_secret: cypress_record_token
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- cd /drone/src
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_TOKEN --parallel --ci-build-id ci-$DRONE_BUILD_NUMBER-master

volumes:
- name: cache
temp: {}
- name: droneshm
temp: {}

trigger:
branch:
- master
- stable*

---
kind: pipeline
name: cypress-e2e-testing 17

services:
# nextcloud server
- name: server
image: nextcloudci/server:server-10
CYPRESS_baseUrl: http://server/index.php
commands:
- WAIT_ON=$CYPRESS_baseUrl
# Add app sources to the app directory
- export BRANCH=stable16
- echo "Testing against $BRANCH"
- ln -s /drone/src /var/www/html/apps/viewer
- ls -lLa /var/www/html/apps/viewer
- mkdir /var/www/html/data
- chown -R www-data:www-data /var/www/html/apps/viewer
- chown -R www-data:www-data /var/www/html/data

# Install nextcloud, watch logs and run apache
- bash /initnc.sh

steps:
# clone and build the app
- name: build
image: nextcloudci/node:node-5
volumes:
- name: cache
path: /root/.cache
commands:
- git --no-pager log -1
- npm ci
- npm run build
- npm i -g @bahmutov/print-env
- print-env DRONE

# wait on server to be ready
- name: wait-on-server
image: nextcloudci/node:node-5
environment:
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- WAIT_ON=$CYPRESS_baseUrl$LOGIN
- echo "Waiting for $WAIT_ON"
- npm install -g wait-on
- wait-on -i 500 -t 300000 $WAIT_ON
- wait-on -i 500 -t 120000 $WAIT_ON

- name: testing 1
image: cypress/browsers:chrome69
Expand Down Expand Up @@ -355,170 +187,3 @@ trigger:
branch:
- master
- stable*

---
kind: pipeline
name: cypress-e2e-testing 16

services:
# nextcloud server
- name: server
image: nextcloudci/server:server-10
commands:
# Add app sources to the app directory
- export BRANCH=stable16
- echo "Testing against $BRANCH"
- ln -s /drone/src /var/www/html/apps/viewer
- ls -lLa /var/www/html/apps/viewer
- mkdir /var/www/html/data
- chown -R www-data:www-data /var/www/html/apps/viewer
- chown -R www-data:www-data /var/www/html/data

# Install nextcloud, watch logs and run apache
- bash /initnc.sh

steps:
# clone and build the app
- name: build
image: nextcloudci/node:node-5
volumes:
- name: cache
path: /root/.cache
commands:
- git --no-pager log -1
- npm ci
- npm run build

# wait on server to be ready
- name: wait-on-server
image: nextcloudci/node:node-5
environment:
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- WAIT_ON=$CYPRESS_baseUrl$LOGIN
- npm install -g wait-on
- wait-on -i 500 -t 300000 $WAIT_ON

- name: testing 1
image: cypress/browsers:chrome69
depends_on:
- build
- wait-on-server
# avoid memory process crash
# https://docs.cypress.io/guides/references/error-messages.html#The-Chromium-Renderer-process-just-crashed
resources:
limits:
cpu: 3
memory: 800Mi
requests:
cpu: 0.5
memory: 500Mi
volumes:
- name: cache
path: /root/.cache
- name: droneshm
path: /dev/shm
environment:
CYPRESS_RECORD_TOKEN:
from_secret: cypress_record_token
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- cd /drone/src
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_TOKEN --parallel --ci-build-id ci-$DRONE_BUILD_NUMBER-16

- name: testing 2
image: cypress/browsers:chrome69
depends_on:
- build
- wait-on-server
# avoid memory process crash
# https://docs.cypress.io/guides/references/error-messages.html#The-Chromium-Renderer-process-just-crashed
resources:
limits:
cpu: 3
memory: 800Mi
requests:
cpu: 0.5
memory: 500Mi
volumes:
- name: cache
path: /root/.cache
- name: droneshm
path: /dev/shm
environment:
CYPRESS_RECORD_TOKEN:
from_secret: cypress_record_token
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- cd /drone/src
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_TOKEN --parallel --ci-build-id ci-$DRONE_BUILD_NUMBER-16

- name: testing 3
image: cypress/browsers:chrome69
depends_on:
- build
- wait-on-server
# avoid memory process crash
# https://docs.cypress.io/guides/references/error-messages.html#The-Chromium-Renderer-process-just-crashed
resources:
limits:
cpu: 3
memory: 800Mi
requests:
cpu: 0.5
memory: 500Mi
volumes:
- name: cache
path: /root/.cache
- name: droneshm
path: /dev/shm
environment:
CYPRESS_RECORD_TOKEN:
from_secret: cypress_record_token
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- cd /drone/src
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_TOKEN --parallel --ci-build-id ci-$DRONE_BUILD_NUMBER-16

- name: testing 4
image: cypress/browsers:chrome69
depends_on:
- build
- wait-on-server
# avoid memory process crash
# https://docs.cypress.io/guides/references/error-messages.html#The-Chromium-Renderer-process-just-crashed
resources:
limits:
cpu: 3
memory: 800Mi
requests:
cpu: 0.5
memory: 500Mi
volumes:
- name: cache
path: /root/.cache
- name: droneshm
path: /dev/shm
environment:
CYPRESS_RECORD_TOKEN:
from_secret: cypress_record_token
CYPRESS_baseUrl: http://server/index.php/
LOGIN: login
commands:
- cd /drone/src
- $(npm bin)/cypress run --record --key $CYPRESS_RECORD_TOKEN --parallel --ci-build-id ci-$DRONE_BUILD_NUMBER-16

volumes:
- name: cache
temp: {}
- name: droneshm
temp: {}

trigger:
branch:
- master
- stable*
Loading