@@ -4,8 +4,10 @@ set -o allexport
4
4
5
5
TEST_REPO_URL=" https://github.com/cBioPortal/cbioportal-test.git"
6
6
DOCKER_COMPOSE_REPO_URL=" https://github.com/cBioPortal/cbioportal-docker-compose.git"
7
- KEYCLOAK=" true"
8
7
STUDIES=' ascn_test_study study_hg38 teststudy_genepanels study_es_0 lgg_ucsf_2014_test_generic_assay'
8
+ KEYCLOAK=" true"
9
+ RUN_FRONTEND=" false" # Set to "true" if you want to build and run frontend at localhost:3000
10
+ RUN_TESTS=" false" # Set to "true" if you want to run all e2e:local tests
9
11
10
12
# Use database image with preloaded studies
11
13
export DOCKER_IMAGE_MYSQL=cbioportal/cbioportal-dev:database
@@ -19,7 +21,7 @@ cd "$TEMP_DIR/cbioportal-test" || exit 1
19
21
20
22
# Generate keycloak config
21
23
if [ " $KEYCLOAK " = " true" ]; then
22
- ./utils/gen-keycloak-config.sh --studies=$STUDIES --template=' $TEMP_DIR/cbioportal-docker-compose/dev/keycloak/keycloak-config.json' --out=' keycloak-config-generated.json'
24
+ ./utils/gen-keycloak-config.sh --studies=" $STUDIES " --template=' $TEMP_DIR/cbioportal-docker-compose/dev/keycloak/keycloak-config.json' --out=' keycloak-config-generated.json'
23
25
export KEYCLOAK_CONFIG_PATH=" $TEMP_DIR /cbioportal-test/keycloak-config-generated.json"
24
26
fi
25
27
36
38
# Check backend connection at localhost:8080
37
39
./utils/check-connection.sh --url=localhost:8080/api/health --max_retries=50
38
40
39
- # Build frontend
40
- printf " \nBuilding frontend ...\n\n"
41
- cd " $ROOT_DIR " || exit 1
42
- export BRANCH_ENV=master
43
- yarn install --frozen-lockfile
44
- yarn run buildAll
41
+ if [ " $RUN_FRONTEND " = " true" ]; then
42
+ # Build frontend
43
+ printf " \nBuilding frontend ...\n\n"
44
+ cd " $ROOT_DIR " || exit 1
45
+ export BRANCH_ENV=master
46
+ yarn install --frozen-lockfile
47
+ yarn run buildAll
45
48
46
- # Start frontend http server, delete if previous server exists
47
- if [ -e " /var/tmp/cbioportal-pid" ]; then
48
- pkill -F /var/tmp/cbioportal-pid
49
- fi
50
- openssl \
51
- req -newkey rsa:2048 -new -nodes -x509 -days 1 -keyout key.pem -out cert.pem -subj " /C=US/ST=Denial/L=Springfield/O=Dis/CN=localhost" && \
52
- nohup ./node_modules/http-server/bin/http-server --cors dist/ -p 3000 > /dev/null 2>&1 &
53
- echo $! > /var/tmp/cbioportal-pid
49
+ # Start frontend http server, delete if previous server exists
50
+ if [ -e " /var/tmp/cbioportal-pid" ]; then
51
+ pkill -F /var/tmp/cbioportal-pid
52
+ fi
53
+ openssl \
54
+ req -newkey rsa:2048 -new -nodes -x509 -days 1 -keyout key.pem -out cert.pem -subj " /C=US/ST=Denial/L=Springfield/O=Dis/CN=localhost" && \
55
+ nohup ./node_modules/http-server/bin/http-server --cors dist/ -p 3000 > /dev/null 2>&1 &
56
+ echo $! > /var/tmp/cbioportal-pid
54
57
55
- # Wait for frontend at localhost:3000
56
- printf " \nVerifying frontend connection ...\n\n"
57
- cd " $TEMP_DIR /cbioportal-test" || exit 1
58
- ./utils/check-connection.sh --url=localhost:3000
58
+ # Wait for frontend at localhost:3000
59
+ printf " \nVerifying frontend connection ...\n\n"
60
+ cd " $TEMP_DIR /cbioportal-test" || exit 1
61
+ ./utils/check-connection.sh --url=localhost:3000
62
+ fi
59
63
60
- # Build e2e localdb tests
61
- cd " $ROOT_DIR /end-to-end-test" || exit 1
62
- yarn --ignore-engines
64
+ if [ " $RUN_TESTS " = " true" ]; then
65
+ # Build e2e localdb tests
66
+ cd " $ROOT_DIR /end-to-end-test" || exit 1
67
+ yarn --ignore-engines
63
68
64
- # Run e2e localdb tests
65
- cd " $ROOT_DIR " || exit 1
66
- yarn run e2e:local
69
+ # Run e2e localdb tests
70
+ cd " $ROOT_DIR " || exit 1
71
+ yarn run e2e:local
72
+ fi
67
73
68
74
# Cleanup
69
75
cd " $ROOT_DIR " || exit 1
0 commit comments