diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a50dedad597aec4491ae20aa0bf09a38f9c33b19..5a3d81f91b93318e299ddb12af637849f0b35178 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ default: stages: - build + - container - run compile: @@ -34,3 +35,25 @@ compile: # - silicon # script: # - ./build/run gaudirun.py JugBase/tests/options/simple_reader.py + +docker_image: + image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest + stage: container + tags: + - sodium + only: + - master + - ci_dev + script: + - cd containers/docker && make release-latest + +docker_tag: + image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest + stage: container + tags: + - sodium + only: + - tags + script: + - cd containers/docker && make release + diff --git a/CMakeLists.txt b/CMakeLists.txt index fe202dca13e772e8b49bf6ce549e8dbf6bbc5c0f..ab557d77ee80a5576574d5f5df0d7b33f08395d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.2.0) +cmake_minimum_required(VERSION 0.3.1) set(CMAKE_PREFIX_PATH $ENV{HOME}/lib CMAKE_PREFIX_PATH) find_package(NPDet REQUIRED) diff --git a/VERSION b/VERSION new file mode 100644 index 0000000000000000000000000000000000000000..9e11b32fcaa96816319e5d0dcff9fb2873f04061 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.3.1 diff --git a/containers/docker/Dockerfile b/containers/docker/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..085792fc3cd094b0b8f556ce1930b0481c115140 --- /dev/null +++ b/containers/docker/Dockerfile @@ -0,0 +1,31 @@ +FROM eicweb.phy.anl.gov:4567/containers/eic_container/eic:latest + +LABEL maintainer="Whitney Armstrong <warmstrong@anl.gov>" \ + name="juggler" \ + group="EIC/juggler" \ + march="native" \ + basedist="debian" \ + base="eic_container/eic" \ + version="2.2.2" + +RUN cd /tmp \ + && git clone https://eicweb.phy.anl.gov/EIC/NPDet.git \ + && mkdir -p NPDet/build && cd NPDet/build \ + && cmake ../. -DCMAKE_CXX_STANDARD=17 \ + && make -j30 && make -j4 install \ + && cd /tmp && rm -rf /tmp/NPDet + +RUN cd /tmp \ + && git clone https://eicweb.phy.anl.gov/EIC/eicd.git \ + && mkdir -p eicd/build && cd eicd/build \ + && cmake ../. -DCMAKE_CXX_STANDARD=17 \ + && make -j30 && make -j4 install \ + && cd /tmp && rm -rf /tmp/eicd + +RUN cd /tmp \ + && git clone https://eicweb.phy.anl.gov/EIC/juggler.git \ + && mkdir -p juggler/build && cd juggler/build \ + && cmake ../. -DCMAKE_CXX_STANDARD=17 \ + && make -j30 && make -j4 install \ + && cd /tmp && rm -rf /tmp/juggler + diff --git a/containers/docker/config.env b/containers/docker/config.env new file mode 100644 index 0000000000000000000000000000000000000000..5b737571e4315bee966ced4128b64772b1241091 --- /dev/null +++ b/containers/docker/config.env @@ -0,0 +1,20 @@ +# Port to run the container + +REG_HOST ?= eicweb.phy.anl.gov +REG_NAME ?= eicweb.phy.anl.gov:4567 +REG_PORT ?= 4567 +REG_URL ?= https://$(REG_HOST) + +APP_NAME = juggler +REPO_NAME = juggler + +DH_ORG = argonneeic + +GL_GROUP = eic +GL_REG_GROUP = eic/juggler +GL_REG_NAME = $(REG_NAME) + + + + + diff --git a/containers/docker/usage.sh b/containers/docker/usage.sh new file mode 100644 index 0000000000000000000000000000000000000000..0b72b4786a77c190f0247a7f566fc50f93c914d6 --- /dev/null +++ b/containers/docker/usage.sh @@ -0,0 +1,26 @@ +# INSTALL +# - copy the files deploy.env, config.env, version.sh and Makefile to your repo +# - replace the vars in deploy.env +# - define the version script + +# Build the container +make build + +# Build and publish the container +make release + +# Publish a container to AWS-ECR. +# This includes the login to the repo +make publish + +# Run the container +make run + +# Build an run the container +make up + +# Stop the running container +make stop + +# Build the container with differnt config and deploy file +make cnf=another_config.env dpl=another_deploy.env build \ No newline at end of file diff --git a/containers/docker/version.sh b/containers/docker/version.sh new file mode 100644 index 0000000000000000000000000000000000000000..99ac542266b48e0efbcb2ef3ade67729d90279c0 --- /dev/null +++ b/containers/docker/version.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cat ../../VERSION | sed 's/)//' +