Skip to content

Commit

Permalink
Merge pull request #360 from VirtualFlyBrain/vfb_geppetto_application
Browse files Browse the repository at this point in the history
adding debug version build as well as ClassQueriesFrom field
  • Loading branch information
Robbie1977 authored Aug 5, 2019
2 parents 4b3b5c9 + 76967c4 commit 06eb55c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,24 @@ env:
- secure: nG+5a2LvKsXfLGwIG3hqEqQOhMvsLdB4N0pQ5Oq47vLKkQLQMO9RvUn9fSArYy4nVJKOSHiSEuEyFFCN84XBSjK5c+VuRyucrcph7myufhMLogVhlbjuuoTg5EESLGfQ5d/cbQ2YKSfLwETG9eoNCElGyu39FP1KmmVVk2CVaB9Tkvd/pIXx98oR1QuQOWQgNj3h6EFZbQOOmCnrFD+gtHq4yWeu2/eUg+8GcgpXkFYPpyeHPkoorrGsu8EfgyObVO8moFnKTrtpJmg886yXV5BpMwMEv8LKLxjTwSJX29rhf1uZkXNlCrF9zvfQ6iQ05gWDbsf+Ttio3CSVqCIudfez/ZC/uJ4qS/ZGFlOE/Dc4ulE/UBKQE9vE5EWlsJjoZRlTePlNJ1jrhezuJRISXVo7wQUGUtXiI7t3ko5PUO/Kc/UWBKQPZVU0AXwgkrXsXJFTaGSkBMf07OolHjI5v7/QdGctI/pmnox3l1IHr2Wq+3iAhPzyUL6aPQPS/ClYZTqTSCTTXCdQPWVkfkw4AnNuaNdQC7HkpsLRJ47G5XNVoGJIGvFevhSc1Pjy/fT51sh6Lznzc0rsDirFoXGAkWtibszuTHjzN9pGISXLzSqTe6fIYQYM22bO0FApwqdCrSc4TsTFTJCJIPyABlhj5vfaLmplPb2U3z8Q5eQ+wwU=
- secure: MgVs6eMaOJwmSVQlTjHRE1rDNJftnDpytewRnZF+0kTVwzTM02/UQm9eNB2nNSBCzGbAj4YhrXPkt9d+kJ4o7MfFhgD2MNnIC7wZQQQxgHC0rZLAll8HdvcaiaGVofMzuzJL6CPvFeA5sNBmzF7aoy89vrxxBTm+AUqLrqZztcG0H5FcxCc+l4oGPxzXykascJUEHdEgnRx6me4BNnDLj+K+xh1zWQEHwc2b6Mux06uZzcBm9IRhp/01W+FDlsgAuuD7wZ997I+YgrfRMhilTjOK58Ao21rqUFICb63Uk14yDcMQhUaGXj4QPkSdWiEgzG3egcq32iegG4PI5/Fuwlr2xtNaNrS+UzZy4JN/vuXjJqEUzeqdsttgwBF915duRqfFUGJFRyCMjpqE5qDfIG78th/dwL0NxAlz+mV71jf3qkVXeWtLMTsKWR2XZVDw9Fd6VWYkhLBoUaomtJi+H1Gq6ShIPCnvm16P7rMEtQ5g/ayUjExzfr1tybdLGr7oV+qEqcToUpiB4I69vYe+PrUVHen0j9RgGMRBXxBBpnPKdj42HS3jGb9w74BNUjNKenNJnaiuLWxtZ8M1pJecOf4n5Ip5DiljGOJ4IqMF/Oaox16WbAa2FI7RJU0hXKMbaic1DGyYzPihLXvH/Vx0l5E4VeVVCogwwwz9QV/NzzE=
- COMMIT=${TRAVIS_COMMIT::8}
matrix:
- BUILD_TYPE=production
- BUILD_TYPE=development
services:
- docker
before_install:
- export VFB_REPO=$(echo ${TRAVIS_REPO_SLUG##*/} | awk '{gsub(/\-/,"_",$0);gsub(/\./,"_",$0);print toupper($0)}')
- export REPO=$(echo ${TRAVIS_REPO_SLUG} | awk '{gsub(/\./,"_",$0);print tolower($0)}')
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-} ; fi`
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo ${TRAVIS_BRANCH/\//-}; fi`
- export TAG=`if [ "$BUILD_TYPE" == "development" ]; then echo "$TAG-development"; else echo "$TAG"; fi`
install:
- npm install jest@24.8.0 puppeteer@1.17.0 jest-puppeteer@3.9.0 babel-preset-env@1.6.0 url-join@4.0.0
before_script:
- docker pull metacell/java-virgo-maven:development || true
script:
- echo -e "travis_fold:start:Docker_Build" || true
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- travis_retry docker build --cache-from metacell/java-virgo-maven:development -t=$REPO:$TAG --build-arg targetBranch=$TRAVIS_BRANCH --build-arg originBranch=$BRANCH --build-arg defaultBranch=$DEFAULT_BRANCH $DOCKER_FOLDER || travis_terminate 1
- travis_retry docker build --cache-from metacell/java-virgo-maven:development -t=$REPO:$TAG --build-arg build_type=$BUILD_TYPE --build-arg targetBranch=$TRAVIS_BRANCH --build-arg originBranch=$BRANCH --build-arg defaultBranch=$DEFAULT_BRANCH $DOCKER_FOLDER || travis_terminate 1
- echo -e "travis_fold:end:Docker_Build" || true
- echo -e "travis_fold:start:Docker_Run" || true
- travis_retry docker run -t -dit --name=$CONTAINER_NAME -p 8080:8080 $REPO:$TAG || travis_terminate 1
Expand Down
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ARG targetBranch=development
ARG originBranch=development
ARG defaultBranch=development

ARG build_type=production

ARG googleAnalyticsSiteCode=UA-45841517-1

ENV VFB_PDB_SERVER=http://pdb.virtualflybrain.org
Expand Down Expand Up @@ -49,8 +51,12 @@ RUN ../copy.sh https://github.com/openworm/org.geppetto.datasources.git "${targe
mvn -Dhttps.protocols=TLSv1.2 -DskipTests --quiet install &&\
rm -rf src

RUN ../copy.sh https://github.com/VirtualFlyBrain/uk.ac.vfb.geppetto.git "${targetBranch}" "${originBranch}" "${defaultBranch}" &&\
cd uk.ac.vfb.geppetto &&\
RUN ../copy.sh https://github.com/VirtualFlyBrain/uk.ac.vfb.geppetto.git "${targetBranch}" "${originBranch}" "${defaultBranch}"

RUN export DEBUG=false; if test "$build_type" = "development" ; then export DEBUG=true; fi && \
/bin/grep -rls "Boolean debug=" $HOME/workspace/uk.ac.vfb.geppetto/src/ | xargs /bin/sed -i "s@Boolean debug=.*;@Boolean debug=$DEBUG;@g"

RUN cd uk.ac.vfb.geppetto &&\
/bin/echo -e "\e[96mMaven install uk.ac.vfb.geppetto\e[0m" &&\
mvn -Dhttps.protocols=TLSv1.2 -DskipTests --quiet install &&\
rm -rf src
Expand Down
1 change: 1 addition & 0 deletions components/VFBMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ export default class VFBMain extends React.Component {
showButtonBar={true}
termInfoName={this.termInfoName}
termInfoId={this.termInfoId}
exclude={["ClassQueriesFrom", "Debug"]}
order={['Name',
'Label',
'Alternative Names',
Expand Down
10 changes: 10 additions & 0 deletions components/interface/VFBTermInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,15 @@ class VFBTermInfo extends React.Component {
this.contentBackup.keys = this.contentTermInfo.keys.slice();
this.contentBackup.values = this.contentTermInfo.values.slice();
var tempArray = [];
if ((this.props.exclude !== undefined ) && (this.props.exclude.length > 0)) {
for (var x = 0; x < this.props.exclude.length; x++) {
var index = this.contentTermInfo.keys.indexOf(this.props.exclude[x]);
if (index > -1) {
this.contentTermInfo.keys.splice(index, 1);
this.contentTermInfo.values.splice(index, 1);
}
}
}
for (var x = 0; x < this.props.order.length; x++) {
var index = this.contentTermInfo.keys.indexOf(this.props.order[x]);
if (index > -1) {
Expand Down Expand Up @@ -796,6 +805,7 @@ export default class VFBTermInfoWidget extends React.Component {
id={this.idWidget}
ref="termInfoRef"
order={this.props.order}
exclude={this.props.exclude}
closeHandler={this.closeHandler}
customHandler={this.customHandler}
showButtonBar={this.props.showButtonBar}
Expand Down

0 comments on commit 06eb55c

Please sign in to comment.