Skip to content

Commit

Permalink
finished mango container and added makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
akmorrow13 committed Aug 5, 2020
1 parent 807ef4c commit 542556e
Show file tree
Hide file tree
Showing 7 changed files with 146 additions and 1 deletion.
31 changes: 31 additions & 0 deletions mango-jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM bigdatagenomics/miniconda3-maven3-openjdk8

MAINTAINER Alyssa Morrow, [email protected]

# Environment Variables
ARG SPARK_VERSION
ARG HADOOP_VERSION
ARG COVERALLS_REPO_TOKEN
ARG WORKSPACE

WORKDIR /home

# Install make and pip/python dependencies
# uuid-runtime: for unique identifiers used in conda envs
RUN apt-get update && apt-get install -y \
git \
make \
python3.5 \
python3-pip \
nodejs \
uuid-runtime \
python-tk \
chromium

# set chromium environment variable for mango-pileup karma tests
ENV CHROME_BIN=/usr/bin/chromium

# install node/npm
RUN conda install -y nodejs

ENTRYPOINT ["${WORKSPACE}/scripts/jenkins-test"]
21 changes: 21 additions & 0 deletions mango-jenkins/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Definitions
git_commit ?= $(shell git log --pretty=oneline -n 1 | cut -f1 -d " ")
name = bigdatagenomics/mango-jenkins
tag = 0.0.1--${git_commit}
build_tool = runtime-container.DONE

# Steps
build: Dockerfile
cd ../miniconda3-maven3-openjdk8 && make build
docker build -t ${name}:${tag} .
-docker rmi ${name}:latest
docker tag ${name}:${tag} ${name}:latest
touch ${build_tool}

clean:
docker rmi -f ${name}:${tag} ${name}:${tag}

push: build
# Requires ~/.dockercfg
docker push ${name}:${tag}
docker push ${name}:latest
31 changes: 31 additions & 0 deletions mango-jenkins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
This directory contains the docker images for
[Mango](https://www.github.com/bigdatagenomics/mango-jenkins). This container contains
all requirements for the [Mango](https://github.com/bigdatagenomics/mango) build
for running with Jenkins.

Running
===

When the runtime container is run, the following environment variables should be
specified:

- SPARK_VERSION: Spark Version
- HADOOP_VERSION: Hadoop version
- COVERALLS_REPO_TOKEN: Token for Coveralls
- WORKSPACE: Workspace where the current mango repository is pulled


An example command to run mango Jenkins tests is:

```
docker run -v $WORKSPACE:${WORKSPACE} \
-e COVERALLS_REPO_TOKEN=${COVERALLS_REPO_TOKEN} \
-e WORKSPACE=${WORKSPACE} \
-e SPARK_VERSION=${SPARK_VERSION} \
-e HADOOP_VERSION=${HADOOP_VERSION} \
-e SCALAVER=${SCALAVER} \
--entrypoint=${WORKSPACE}/scripts/jenkins-test \
bigdatagenomics/mango-jenkins:latest
```
20 changes: 20 additions & 0 deletions maven3-openjdk8-alpine/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Definitions
git_commit ?= $(shell git log --pretty=oneline -n 1 | cut -f1 -d " ")
name = bigdatagenomics/maven3-openjdk8-alpine
tag = 0.0.1--${git_commit}
build_tool = runtime-container.DONE

# Steps
build: Dockerfile
docker build -t ${name}:${tag} .
-docker rmi ${name}:latest
docker tag ${name}:${tag} ${name}:latest
touch ${build_tool}

clean:
docker rmi -f ${name}:${tag} ${name}:${tag}

push: build
# Requires ~/.dockercfg
docker push ${name}:${tag}
docker push ${name}:latest
20 changes: 20 additions & 0 deletions maven3-openjdk8/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Definitions
git_commit ?= $(shell git log --pretty=oneline -n 1 | cut -f1 -d " ")
name = bigdatagenomics/maven3-openjdk8
build_tool = runtime-container.DONE
tag = 0.0.1--${git_commit}

# Steps
build: Dockerfile
docker build -t ${name}:${tag} .
-docker rmi ${name}:latest
docker tag ${name}:${tag} ${name}:latest
touch ${build_tool}

clean:
docker rmi -f ${name}:${tag} ${name}:${tag}

push: build
# Requires ~/.dockercfg
docker push ${name}:${tag}
docker push ${name}:latest
2 changes: 1 addition & 1 deletion miniconda3-maven3-openjdk8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apt-get update --fix-missing && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh -O ~/miniconda.sh && \
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py37_4.8.3-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda clean -tipsy && \
Expand Down
22 changes: 22 additions & 0 deletions miniconda3-maven3-openjdk8/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Definitions
build_output = ${runtime_path}/miniconda3-maven3-openjdk8
git_commit ?= $(shell git log --pretty=oneline -n 1 | cut -f1 -d " ")
name = bigdatagenomics/miniconda3-maven3-openjdk8
tag = 0.0.1--${git_commit}
build_tool = runtime-container.DONE

# Steps
build: Dockerfile
cd ../maven3-openjdk8 && make build
docker build -t ${name}:${tag} .
-docker rmi ${name}:latest
docker tag ${name}:${tag} ${name}:latest
touch ${build_tool}

clean:
docker rmi -f ${name}:${tag} ${name}:${tag}

push: build
# Requires ~/.dockercfg
docker push ${name}:${tag}
docker push ${name}:latest

0 comments on commit 542556e

Please sign in to comment.