Unverified Commit b5fda89f authored by Ankur Kumar's avatar Ankur Kumar
Browse files

Add feature: Use custom bio-sources

- Add new env var BIOSOURCES_REPO_URL
- Modified build script to pull and install biosources
- Update instructions
parent 0dcd6b92
......@@ -28,7 +28,6 @@ You can use your custom mine for the builds.
- Set the git url of your mine to the env var `MINE_REPO_URL`. (directory structure similar to biotestmine is assumed)
If you do not have your mine hosted on github/gitlab then you can also mount your mine files directly to the build container. Add your mine folder inside `./data/mine` folder created by docker compose and uncomment the following line in the docker-compose.yml file.
```bash
# - ./data/mine/[PUT_YOUR_MINE_NAME_HERE]:/home/intermine/intermine/ [PUT_YOUR_MINE_NAME_HERE]
......@@ -46,7 +45,10 @@ You can use your custom mine for the builds.
> Note: DO NOT add the trailing "/"
#### Step 4
#### Step 4 (optional)
- Set the git url of your bio-sources repo to the env var `BIOSOURCES_REPO_URL`.
#### Step 5
- Follow [Adding data and project configs](#adding-data-and-project-configs) section to load data and config to your mine.
......@@ -108,6 +110,10 @@ Available options are:
Add you mine github/gitlab url. It will be used to pull your mine inside build container
- BIOSOURCES_REPO_URL
Add you bio-sources repo github/gitlab url. It will be used to pull your bio sources inside build container
- IM_DATA_DIR
Set it to the data dir prefix that you have in your project.xml file. This will be used for search and replace to fix data locations inside the build container.
......
......@@ -11,6 +11,7 @@ services:
environment:
- MINE_NAME=${MINE_NAME:-biotestmine}
- MINE_REPO_URL=${MINE_REPO_URL:-}
- BIOSOURCES_REPO_URL=${BIOSOURCE_REPO_URL:-}
- IM_DATA_DIR=${IM_DATA_DIR:-DATA_DIR}
- MEM_OPTS=${MEM_OPTS:-"-Xmx2g -Xms1g"}
depends_on:
......
......@@ -9,6 +9,7 @@ echo "" > /home/intermine/intermine/build.progress
echo "Starting build"
echo $MINE_REPO_URL
# Check if mine exists
if [ ! -d ${MINE_NAME:-biotestmine} ]; then
# echo "$(date +%Y/%m/%d-%H:%M) Clone ${MINE_NAME:-biotestmine}" #>> /home/intermine/intermine/build.progress
......@@ -30,6 +31,17 @@ else
cd /home/intermine/intermine
fi
# clone bio sources repo if url is given
if [ ! -z "$BIOSOURCES_REPO_URL" ]; then
echo "$(date +%Y/%m/%d-%H:%M) Clone ${BIOSOURCES_REPO_URL}"
git clone ${BIOSOURCES_REPO_URL} $MINE_NAME-bio-sources
# build and install bio sources
cd /home/intermine/intermine/$MINE_NAME-bio-sources
echo "$(date +%Y/%m/%d-%H:%M) Building and Installing bio sources"
./gradlew clean -Dorg.gradle.project.release=dev --stacktrace
./gradlew install --stacktrace
fi
# Copy project_build from intermine_scripts repo
if [ ! -f /home/intermine/intermine/${MINE_NAME:-biotestmine}/project_build ]; then
echo "$(date +%Y/%m/%d-%H:%M) Cloning intermine scripts repo to /home/intermine/intermine/intermine-scripts"
......
......@@ -13,6 +13,7 @@ services:
environment:
- MINE_NAME=${MINE_NAME:-biotestmine}
- MINE_REPO_URL=${MINE_REPO_URL:-}
- BIOSOURCES_REPO_URL=${BIOSOURCE_REPO_URL:-}
- IM_DATA_DIR=${IM_DATA_DIR:-DATA_DIR}
- MEM_OPTS=${MEM_OPTS:-"-Xmx2g -Xms1g"}
depends_on:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment