lipase is now released as a package on an owncloud directory
This will ease the deployment to users.
This commit is contained in:
parent
61f6d9aeba
commit
8c3a5b0d72
|
@ -1,5 +1,10 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {label 'physix_agent'}
|
agent {label 'physix_agent'}
|
||||||
|
environment {
|
||||||
|
// GRAFFY_OWNCLOUD_JENKINS_PWD's value has been obtained from https://cloud.ipr.univ-rennes1.fr as an app password and is defined in gitlab as a CI secret variable,
|
||||||
|
// then this app password has been declared to jenkins's credentials as a secret text with the name graffy-cloudipr-for-jenkinsipr
|
||||||
|
GRAFFY_OWNCLOUD_JENKINS_PWD = credentials('graffy-cloudipr-for-jenkinsipr')
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Initial setup...') {
|
stage('Initial setup...') {
|
||||||
steps {
|
steps {
|
||||||
|
@ -21,13 +26,16 @@ pipeline {
|
||||||
// // sh '/bin/bash ./src/CI/CI.bash -d ci_venv'
|
// // sh '/bin/bash ./src/CI/CI.bash -d ci_venv'
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// stage('Releasing package...') {
|
stage('Releasing package...') {
|
||||||
// steps {
|
steps {
|
||||||
// echo 'Releasing package...'
|
echo 'Releasing package...'
|
||||||
// // sh 'rm -rf $HOME/www/*'
|
sh './scripts/release_lipase_package.bash'
|
||||||
// // sh 'cp -a ./src/doc/build/html/* $HOME/www/'
|
//sh 'python -c "import owncloud; oc = owncloud.Client(''https://cloud.ipr.univ-rennes1.fr''); oc.login(''graffy'',''$OWNCLOUD_GITLABUR1_PWD''); oc.put_file(''downloads/%installer_file_name%', r'%installer_file_path%')"'
|
||||||
// }
|
// sh 'make FIJI_ROOT_PATH=$(pwd)/Fiji.app package'
|
||||||
// }
|
// sh 'rm -rf $HOME/www/*'
|
||||||
|
// sh 'cp -a ./src/doc/build/html/* $HOME/www/'
|
||||||
|
}
|
||||||
|
}
|
||||||
stage('Cleaning up...') {
|
stage('Cleaning up...') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Cleaning artifacts...'
|
echo 'Cleaning artifacts...'
|
||||||
|
|
32
Makefile
32
Makefile
|
@ -4,15 +4,19 @@ FIJI_EXE_PATH=$(FIJI_ROOT_PATH)/ImageJ-linux64
|
||||||
# RAW_IMAGES_ROOT_PATH:='/opt/ipr/cluster/work.global/graffy/jenkins-store/lipase/raw-images'
|
# RAW_IMAGES_ROOT_PATH:='/opt/ipr/cluster/work.global/graffy/jenkins-store/lipase/raw-images'
|
||||||
RAW_IMAGES_ROOT_PATH:=$(shell echo ~/work/lipase/raw-images)
|
RAW_IMAGES_ROOT_PATH:=$(shell echo ~/work/lipase/raw-images)
|
||||||
LIB_SRC_FILES=$(shell find ./src/lipase -name "*.py")
|
LIB_SRC_FILES=$(shell find ./src/lipase -name "*.py")
|
||||||
|
LIPASE_VERSION=1.00
|
||||||
|
|
||||||
|
BUILD_ROOT_PATH=$(shell pwd)/build
|
||||||
|
PACKAGE_FILE_PATH=$(shell pwd)/lipase-$(LIPASE_VERSION).zip
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: test0001
|
all: test
|
||||||
|
|
||||||
$(FIJI_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ip.lipase.lib.jar: $(LIB_SRC_FILES)
|
$(BUILD_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ipr.lipase.lib.jar: $(LIB_SRC_FILES)
|
||||||
pushd ./src; \
|
pushd ./src; \
|
||||||
mkdir -p $(FIJI_ROOT_PATH)/jars/Lib ; \
|
mkdir -p $(BUILD_ROOT_PATH)/jars/Lib ; \
|
||||||
find ./lipase -name "*.py" > /tmp/files.txt ; \
|
find ./lipase -name "*.py" > /tmp/files.txt ; \
|
||||||
jar cvf $(FIJI_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ip.lipase.lib.jar @/tmp/files.txt ; \
|
jar cvf $(BUILD_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ipr.lipase.lib.jar @/tmp/files.txt ; \
|
||||||
popd
|
popd
|
||||||
|
|
||||||
.PHONY: install_ij_opencv
|
.PHONY: install_ij_opencv
|
||||||
|
@ -56,16 +60,17 @@ install_ij_opencv:
|
||||||
$(FIJI_ROOT_PATH)/ImageJ-linux64 --update update; \
|
$(FIJI_ROOT_PATH)/ImageJ-linux64 --update update; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
.PHONY: install_lipase_libs
|
$(PACKAGE_FILE_PATH): $(BUILD_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ipr.lipase.lib.jar
|
||||||
install_lipase_libs: $(FIJI_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ip.lipase.lib.jar install_ij_opencv
|
mkdir -p $(BUILD_ROOT_PATH)/plugins/Ipr ; \
|
||||||
|
rsync -a ./src/ij-plugins/Ipr/ $(BUILD_ROOT_PATH)/plugins/Ipr/ ; \
|
||||||
|
zip -r $(PACKAGE_FILE_PATH) $(BUILD_ROOT_PATH)
|
||||||
|
|
||||||
.PHONY: install_lipase_plugins
|
.PHONY: package
|
||||||
install_lipase_plugins:
|
package: $(PACKAGE_FILE_PATH)
|
||||||
mkdir -p $(FIJI_ROOT_PATH)/plugins/Ipr ; \
|
|
||||||
rsync -a ./src/ij-plugins/Ipr/ $(FIJI_ROOT_PATH)/plugins/Ipr/
|
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: install_lipase_libs install_lipase_plugins
|
install: $(PACKAGE_FILE_PATH) install_ij_opencv
|
||||||
|
pushd $(FIJI_ROOT_PATH); unzip $(PACKAGE_FILE_PATH); popd
|
||||||
|
|
||||||
.PHONY: test0001
|
.PHONY: test0001
|
||||||
test0001: install
|
test0001: install
|
||||||
|
@ -81,3 +86,8 @@ test0001: install
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: test0001
|
test: test0001
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -Rf $(BUILD_ROOT_PATH)
|
||||||
|
rm -Rf $(PACKAGE_FILE_PATH)
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
make clean
|
||||||
rm -Rf './Fiji.app'
|
rm -Rf './Fiji.app'
|
||||||
|
rm -Rf './python.virtualenv'
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
LIPASE_PACKAGE_FILE_PATH=$(ls lipase*.zip)
|
||||||
|
echo "LIPASE_PACKAGE_FILE_PATH=$LIPASE_PACKAGE_FILE_PATH"
|
||||||
|
if [ "$GRAFFY_OWNCLOUD_JENKINS_PWD" = '' ]
|
||||||
|
then
|
||||||
|
echo "the value of the environment variable GRAFFY_OWNCLOUD_JENKINS_PWD is empty, while its contents are expected to come from JenkinsFile (this script is designed to be called from the accompanying JenkinsFile)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
virtualenv ./python.virtualenv
|
||||||
|
source ./python.virtualenv/bin/activate
|
||||||
|
pip install pyocclient # installs python owncloud module
|
||||||
|
|
||||||
|
python -c "import owncloud; oc = owncloud.Client('https://cloud.ipr.univ-rennes1.fr'); oc.login('graffy','$GRAFFY_OWNCLOUD_JENKINS_PWD'); oc.put_file('downloads/$LIPASE_PACKAGE_FILE_PATH', r'$LIPASE_PACKAGE_FILE_PATH')"
|
||||||
|
|
Loading…
Reference in New Issue