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

Added mango-jenkins and Makefiles #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
43 changes: 43 additions & 0 deletions mango-jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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

# add group and user for jenkins
RUN groupadd jenkins
RUN useradd -ms /bin/bash jenkins -g jenkins

# Install make and pip/python dependencies
# gcc: required for psutil used in python setup.py scripts
# uuid-runtime: for unique identifiers used in conda envs
# libappindicator3-1: missing library required for chrome
RUN apt-get update && apt-get install -y \
git \
make \
gcc \
uuid-runtime \
libappindicator3-1

# python3.5 \
# python3-pip \
# nodejs \
# python-tk \

# install chrome
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install

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

# 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
32 changes: 32 additions & 0 deletions mango-jenkins/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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} \
--user jenkins:jenkins \
-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