Commit 4928ebdc authored by Ludovic Cottret's avatar Ludovic Cottret
Browse files

Singularity

parent 3263d3ba
image: maven:3.6-adoptopenjdk-14
stages:
- build
- test
- deploy
- singularity
variables:
MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode"
......@@ -9,17 +15,20 @@ cache:
- .m2/repository/
build:
image: maven:3.6-adoptopenjdk-14
stage: build
script:
- mvn compile
test:
image: maven:3.6-adoptopenjdk-14
stage: test
script:
- mvn clean test
- cat coverage/target/site/jacoco-aggregate/index.html | grep -o '<tfoot>.*</tfoot>'
deploySnapshot:
image: maven:3.6-adoptopenjdk-14
stage: deploy
script:
- mvn $MAVEN_CLI_OPTS deploy -Dmaven.test.skip=true
......@@ -27,6 +36,7 @@ deploySnapshot:
- develop
deployCentral:
image: maven:3.6-adoptopenjdk-14
stage: deploy
before_script:
- 'which ssh-agent || ( apt-get update -qy && apt-get install openssh-client -qqy )'
......@@ -47,3 +57,14 @@ deployCentral:
- mvn $MAVEN_CLI_OPTS release:perform -Darguments=-Dgpg.passphrase=${GPG_PASSPHRASE} -DlocalCheckout=true
only:
- master
buildSingularity:
stage: singularity
image:
name: quay.io/singularity/singularity:v3.4.0
entrypoint: [ "" ]
script:
- singularity build met4j-toolbox.sif met4j.singularity
- singularity push --docker-username "${CI_REGISTRY_USER}" --docker-password "${CI_REGISTRY_PASSWORD}" met4j-toolbox.sif oras://"$CI_REGISTRY_IMAGE"/met4j-singularity:"$CI_COMMIT_TAG"
when: manual
......@@ -62,7 +62,7 @@ mv ./target/*-jar-with-dependencies.jar ../../../
## Usage
Documentation for the library modules can be found in each module's own README.
Detailed code examples can be found at [https://forgemia.inra.fr/metexplore/tutorialmet4j](https://cecill.info/licences/Licence_CeCILL_V2.1-en.html).
Detailed code examples can be found at [here](https://forgemia.inra.fr/metexplore/tutorialmet4j).
The toolbox can be launched using
```
......@@ -74,6 +74,14 @@ which will list all the contained applications that can be called using
java -cp met4j-toolbox-0.8.0-jar-with-dependencies.jar <App full name> -h
```
### With singularity
You need at least [singularity](https://sylabs.io/guides/3.5/user-guide/quick_start.html) v3.5.
```console
singularity pull met4j-toolbox.sif oras://registry.forgemia.inra.fr/metexplore/met4j/met4j-singularity:latest
```
## Contributing
Pull requests are welcome **on the gitlab repo** ([https://forgemia.inra.fr/metexplore/met4j](https://forgemia.inra.fr/metexplore/met4j)). For major changes, please open an issue first to discuss what you would like to change.
......
Bootstrap: docker
From: debian:stable-slim
%runscript
if [ $# -lt 1 ]
then
echo "display Help"
exec java -jar /opt/bin/met4j.jar
else
echo "Lauch met4j-toolbox"
exec java -Dlog4j.configuration= -cp /opt/bin/met4j.jar fr.inrae.toulouse.metexplore.met4j_toolbox."$@"
fi
%help
Usage: met4j.sif
This is singularity container for met4j
%labels
Maintainer Ludovic.Cottret@inrae.fr
%post
export DEBIAN_FRONTEND=noninteractive
apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
openjdk-11-jre \
git \
maven
apt-get clean && \
apt-get purge
mkdir -p /opt
cd /opt
git clone https://forgemia.inra.fr/metexplore/met4j.git
cd met4j/
mvn install
cd met4j-toolbox
mvn package
mkdir -p /opt/bin
cp target/met4j*.jar /opt/bin/met4j.jar
cd /opt
rm -rf met4j ~/.m2
apt-get remove -y maven git
apt-get autoremove -y
%environment
export LC_ALL=C
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment