Skip to content
This repository has been archived by the owner on Mar 31, 2021. It is now read-only.

Commit

Permalink
OBMFULL-6208 Dockerized packages build
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-hilaire committed Nov 19, 2014
1 parent 6061ade commit a1084f8
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 1 deletion.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
63 changes: 63 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
## The goal of this machine is to build packages and expose them into DEB and RPM repositories

## Usage - build and expose packages:
## cd OBM_SOURCES_ROOT_DIRECTORY
## docker build --tag build-obm .
## docker run --name expose-packages --rm --publish 8888:80 build-obm

## Usage - APT configuration example
## deb http://HOST_RUNNING_DOCKER:8888/deb obm obm
## deb http://deb.obm.org/30/contrib wheezy obm

## Usage - YUM configuration example
## [obm-stable]
## name=obm-stable
## baseurl=http://HOST_RUNNING_DOCKER:8888/rpm
## enabled=1
## gpgcheck=0

FROM debian:7.7

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get install -y \
python locales locales-all git \
devscripts ant ant-optional openjdk-7-jre-headless cdbs \
reprepro maven openjdk-7-jdk wget webfs rpm createrepo

RUN mkdir /root/build-{deb,el6}

RUN mkdir -p /repo/deb/conf ; mkdir -p /repo/rpm

## COPY OBM SOURCES
RUN mkdir /obm/
COPY build-system/ /obm/build-system
COPY ca/ /obm/ca
COPY java /obm/java
COPY release /obm/release
COPY saslauthd /obm/saslauthd
COPY satellite /obm/satellite
COPY ui /obm/ui
COPY .git /obm/.git

## BUILD OBM PACKAGES
RUN cd obm/java/sync && \
mvn dependency:go-offline || true && \
mvn package -T1C

RUN cd obm/build-system && \
./build.py /root/build-deb --nocompile --osversion wheezy all && \
./build.py /root/build-el6 --nocompile --osversion el6 all

## BUILD DEB REPOSITORY
COPY docker-resources/distributions /repo/deb/conf/
RUN cd /repo/deb && find /root/build-deb -name \*.deb -exec reprepro -V includedeb obm {} \;

## BUILD RPM REPOSITORY
RUN cp /root/build-el6/*.rpm /repo/rpm/ ; createrepo /repo/rpm

EXPOSE 80

CMD webfsd -F -p 80 -r /repo/


7 changes: 7 additions & 0 deletions docker-resources/distributions
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Origin: OBM www.obm.org
Label: private
Codename: obm
Architectures: i386 amd64 source
Components: obm
Description: private repository
Update: cyrus jetty
4 changes: 3 additions & 1 deletion java/solr/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/ant.mk

JAVA_HOME := /usr/lib/jvm/java-6-sun/
DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH)
JAVA_HOME := /usr/lib/jvm/java-1.7.0-openjdk-$(DEB_BUILD_ARCH)/
export JAVA_HOME
ANT_HOME := /usr/share/ant

DEB_ANT_BUILD_TARGET := build
Expand Down

0 comments on commit a1084f8

Please sign in to comment.