moved the build files outside the repository

In order to prevent pollution of repository with temporary files, the build files can now be where the user wants via BUILD_ROOT_PATH makefile variable.
This commit is contained in:
Guillaume Raffy 2020-04-10 15:14:33 +02:00
parent 13eb92c76e
commit 595fc09571
3 changed files with 12 additions and 12 deletions

7
Jenkinsfile vendored
View File

@ -4,6 +4,7 @@ pipeline {
// 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')
BUILD_ROOT_PATH = $WORKSPACE/build
}
stages {
stage('Initial setup...') {
@ -12,18 +13,18 @@ pipeline {
// erase old builds if anything is left
sh './scripts/cleanup.bash'
sh './scripts/install_fiji.bash'
sh 'make FIJI_ROOT_PATH=$(pwd)/Fiji.app install'
sh 'make BUILD_ROOT_PATH=$BUILD_ROOT_PATH FIJI_ROOT_PATH=$(pwd)/Fiji.app install'
}
}
stage('Testing the package...') {
steps {
sh 'make FIJI_ROOT_PATH=$(pwd)/Fiji.app RAW_IMAGES_ROOT_PATH=/opt/ipr/cluster/work.global/graffy/jenkins-store/lipase/raw-images TESTS_OUTPUT_DATA_PATH=$TMP/$(whoami)/$JOB_NAME test'
sh 'make BUILD_ROOT_PATH=$BUILD_ROOT_PATH FIJI_ROOT_PATH=$(pwd)/Fiji.app RAW_IMAGES_ROOT_PATH=/opt/ipr/cluster/work.global/graffy/jenkins-store/lipase/raw-images TESTS_OUTPUT_DATA_PATH=$TMP/$(whoami)/$JOB_NAME test'
}
}
stage('Building documentation...') {
steps {
echo 'Building documentation...'
sh 'make FIJI_ROOT_PATH=$(pwd)/Fiji.app RAW_IMAGES_ROOT_PATH=/opt/ipr/cluster/work.global/graffy/jenkins-store/lipase/raw-images doc'
sh 'make BUILD_ROOT_PATH=$BUILD_ROOT_PATH FIJI_ROOT_PATH=$(pwd)/Fiji.app RAW_IMAGES_ROOT_PATH=/opt/ipr/cluster/work.global/graffy/jenkins-store/lipase/raw-images doc'
}
}
stage('Releasing package...') {

View File

@ -8,8 +8,8 @@ LIB_SRC_FILES=$(shell find ./src/lipase -name "*.py")
PLUGINS_SRC_FILES=$(shell find ./src/ij-plugins -name "*.py")
LIPASE_VERSION=1.01
BUILD_ROOT_PATH=$(shell pwd)/build
PACKAGE_FILE_PATH=$(shell pwd)/lipase-$(LIPASE_VERSION).zip
BUILD_ROOT_PATH:=$(shell pwd)/build
PACKAGE_FILE_PATH=$(BUILD_ROOT_PATH)/lipase-$(LIPASE_VERSION).zip
.PHONY: all
all: test doc
@ -23,7 +23,7 @@ clean_doc:
cd doc; make clean
$(BUILD_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ipr.lipase.lib.jar: $(LIB_SRC_FILES)
$(BUILD_ROOT_PATH)/ij_zip_source/jars/Lib/fr.univ-rennes1.ipr.lipase.lib.jar: $(LIB_SRC_FILES)
pushd ./src; \
mkdir -p $(BUILD_ROOT_PATH)/jars/Lib ; \
find ./lipase -name "*.py" > /tmp/files.txt ; \
@ -71,10 +71,10 @@ install_ij_opencv:
$(FIJI_ROOT_PATH)/ImageJ-linux64 --update update; \
fi
$(PACKAGE_FILE_PATH): $(BUILD_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ipr.lipase.lib.jar $(PLUGINS_SRC_FILES)
mkdir -p $(BUILD_ROOT_PATH)/plugins/Ipr ; \
rsync -a ./src/ij-plugins/Ipr/ $(BUILD_ROOT_PATH)/plugins/Ipr/ ; \
pushd $(BUILD_ROOT_PATH) ; \
$(PACKAGE_FILE_PATH): $(BUILD_ROOT_PATH)/ij_zip_source/jars/Lib/fr.univ-rennes1.ipr.lipase.lib.jar $(PLUGINS_SRC_FILES)
mkdir -p $(BUILD_ROOT_PATH)/ij_zip_source/plugins/Ipr ; \
rsync -a ./src/ij-plugins/Ipr/ $(BUILD_ROOT_PATH)/ij_zip_source/plugins/Ipr/ ; \
pushd $(BUILD_ROOT_PATH)/ij_zip_source ; \
zip -r $(PACKAGE_FILE_PATH) * ; \
popd
@ -127,4 +127,3 @@ test: test0001 imgproc_tests
.PHONY: clean
clean: clean_doc
rm -Rf $(BUILD_ROOT_PATH)
rm -Rf $(PACKAGE_FILE_PATH)

View File

@ -1,5 +1,5 @@
#!/bin/bash
LIPASE_PACKAGE_FILE_PATH=$(ls lipase*.zip)
LIPASE_PACKAGE_FILE_PATH=$(ls build/lipase*.zip)
LIPASE_USER_MANUAL_PATH=$(pwd)/doc/lipase.pdf
echo "LIPASE_PACKAGE_FILE_PATH=$LIPASE_PACKAGE_FILE_PATH"
if [ "$GRAFFY_OWNCLOUD_JENKINS_PWD" = '' ]