-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rdy for review] Debian package generation (#417)
* first add in ci-testintg branch * rename docker folder to master... * update symb link * update CMakelist * building organize folder * first version of the docker file for ubuntu deb generation * update cirecle.yml * comment nosetest for speed testeing * change workdir after git clone but BEFORE fetching.. * add ls -alh to see the sixy of the deb, add also a timeout of 20minutes * correction on the time out inplementation * cleaning un-necessary stuff * it seems to be working on deb_generation branch, so I move the debian package generation to the master branch * first use of the script * adding the script... * fix branch name in circle.yml and remove bad : in build script * remane Docker file in release * adding the file... * add wget on the list of package installed * correct Docker_sample * changing the way to recover hash of the commit, and to add it in the .deb name * rework docker/README * add stable explicit call in DockerFile * change XX and HASH template variables to CYCAMORE_UBUNTU_MAJOR_VERSION, CYCAMORE_REPO_HASH, add a tmp Dockerfile for the second sed to work... * form differently the deb package name * remove explicit call to docker cyclus:stable container, it is not to be found... * _/- swap * _/- swap * updating deb to proper name * bad deb name fix * Working, putting those change on master branch trigger * uncommenting nosetest * old files, rename script * rename Docker_sample in Docker_template * correct typo * symb link should point to the dev version by default * change the ci-trigger to deb_generation branch * revert Dockerfile to old version * remaning release-ci folder into deb-ci * update Dockerfile (comments+installation destination) * modify build script accordingly to cyclus one * update Docker README * change folder name in circle file * change folder name in script * trying to fix the isntallation of cycamore headers in cyclus include dir * revert stupid commit... * trying to build cycamore docker against cyclus/cyclus:stable * trying to force latest to see if the issu stay.. * moving back master/docker to cyclus:stable,as master:stable should be push with the cyclus release * correct dev into deb * cutting CMakeList line * wrong branch name... * working back on master trigger * set trigger on deb_generation to ensure deb still working * working; back on master trigger * switch trigger to ci-testing, remove discovered dependencies option in CPACK (might reduce ubuntu 16.04 dependency lists * add cyclus into the dependency list * correct typo * back on master
- Loading branch information
Showing
8 changed files
with
180 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
docker/cycamore-ci/Dockerfile | ||
docker/develop-ci/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
|
||
Each subdirectory contains a dockerfile that does something useful: | ||
|
||
* ``cycamore-ci`` is the dockerfile used for running cycamore on a continuous | ||
integration service. This dockerfile assumes that the current working | ||
directory is a cycamore repository - and that version of cycamore is copied | ||
into the docker container and used for the build. The dockerfile in the | ||
cycamore repository root is a symbolic link to this dockerfile. This | ||
dockerfile uses the base image ``cyclus/cyclus`` from the docker hub | ||
Each subdirectory contains a Dockerfile that does something useful: | ||
|
||
* ``develop-ci`` is the Dockerfile used for running Cycamore on a continuous | ||
integration service. This Dockerfile assumes that the current working | ||
directory is a Cycamore repository - and that version of Cycamore is copied | ||
into the Docker container and used for the build. The Dockerfile in the | ||
Cycamore repository root is a symbolic link to this Dockerfile. This | ||
Dockerfile uses the base image ``cyclus/cyclus:latest`` from the Docker hub | ||
repository. This Docker container is uploaded as ``cyclus/Cycamore:latest`` on | ||
the Docker hub when merging a PR on the `develop` branch of the Cycamore Github | ||
repository. | ||
|
||
* ``cloudlus-worker`` | ||
* ``master-ci`` is the Dockerfile used for running last stable Cycamore version | ||
a continuous integration service. This Dockerfile works exactly as the | ||
develop-ci one, except that it builds Cycamore against the | ||
``cyclus/cyclus:stable`` from the Docker hub repository. This Docker container | ||
is also uploaded on the Docker hub as the ``cyclus/Cycamore:stable`` when | ||
merging a PR on the `master` branch of Cycamore Github repository. | ||
|
||
* ``deb-ci`` contains a script which allows to build the Dockerfile require | ||
to generate a Cycamore Debian package for the installation of Cycamore on | ||
ubuntu. The script take the major version number of ubuntu as a parameter. It | ||
builds Cycamore on the corresponding Ubuntu-LTS version, after installing all | ||
Cycamore dependencies -including Cyclus- and generates the Cycamore Debian | ||
installation package that need to be extracted from the Docker container | ||
(tested on Ubuntu 14.04 & 16.04) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
FROM ubuntu:CYCAMORE_UBUNTU_MAJOR_VERSION.04 | ||
|
||
# Because we used specific Ubuntu version can't use cyclus-deps docker container | ||
RUN apt-get -y --force-yes update | ||
|
||
RUN apt-get install -y --force-yes \ | ||
cmake \ | ||
make \ | ||
libboost-all-dev \ | ||
libxml2-dev \ | ||
libxml++2.6-dev \ | ||
libsqlite3-dev \ | ||
libhdf5-serial-dev \ | ||
libbz2-dev \ | ||
coinor-libcbc-dev \ | ||
coinor-libcoinutils-dev \ | ||
coinor-libosi-dev \ | ||
coinor-libclp-dev \ | ||
coinor-libcgl-dev \ | ||
libblas-dev \ | ||
liblapack-dev \ | ||
g++ \ | ||
libgoogle-perftools-dev \ | ||
git \ | ||
python \ | ||
python-tables \ | ||
python-numpy \ | ||
python-nose \ | ||
wget | ||
|
||
RUN wget -r --no-parent -A 'cyclus_1.4.0_*_ubuntu.CYCAMORE_UBUNTU_MAJOR_VERSION.04.deb' http://dory.fuelcycle.org:4848 | ||
run mv dory.fuelcycle.org:4848/* ./; rm -rf dory.fuelcycle.org:4848 | ||
RUN dpkg -i cyclus_1.4.0_*_ubuntu.CYCAMORE_UBUNTU_MAJOR_VERSION.04.deb | ||
|
||
COPY . /cycamore | ||
WORKDIR cycamore | ||
RUN mkdir -p deb | ||
WORKDIR /cycamore/deb | ||
RUN cmake -DCPACK_PACKAGING_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local -DCPACK_HASH_NAME=CYCAMORE_REPO_HASH -DCPACK_SYSTEM_NAME=ubuntu.CYCAMORE_UBUNTU_MAJOR_VERSION.04 .. | ||
|
||
# Build the deb file in the docker container | ||
RUN cpack -v .. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "illegal number of parameters" | ||
exit 1 | ||
fi | ||
|
||
rm Dockerfile | ||
sed -e s/CYCAMORE_UBUNTU_MAJOR_VERSION/${1}/g docker/deb-ci/Dockerfile_template > Dockerfile | ||
sed -i s/CYCAMORE_REPO_HASH/`git rev-parse --short HEAD`/g Dockerfile | ||
|
||
docker build -t deb/ubuntu-${1} . # build cyclus against ubuntu 14.04 in the docker container | ||
docker create --name=deb-${1}.04 deb/ubuntu-${1} # build deb in docker | ||
docker cp deb-${1}.04:/cycamore/deb ./ # extract deb | ||
scp ./deb/cycamore_*_ubuntu.${1}.04.deb [email protected]:./cyclus-deb/ # push the deb on dory | ||
rm -rf deb # clean the deb folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM cyclus/cyclus:latest | ||
|
||
COPY . /cycamore | ||
WORKDIR /cycamore | ||
RUN mkdir Release | ||
WORKDIR /cycamore/Release | ||
RUN cmake .. -DCMAKE_BUILD_TYPE=Release | ||
RUN make -j2 && make install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
FROM cyclus/cyclus | ||
FROM cyclus/cyclus:stable | ||
|
||
COPY . /cycamore | ||
WORKDIR /cycamore | ||
|