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, // 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 // 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') GRAFFY_OWNCLOUD_JENKINS_PWD = credentials('graffy-cloudipr-for-jenkinsipr')
BUILD_ROOT_PATH = $WORKSPACE/build
} }
stages { stages {
stage('Initial setup...') { stage('Initial setup...') {
@ -12,18 +13,18 @@ pipeline {
// erase old builds if anything is left // erase old builds if anything is left
sh './scripts/cleanup.bash' sh './scripts/cleanup.bash'
sh './scripts/install_fiji.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...') { stage('Testing the package...') {
steps { 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...') { stage('Building documentation...') {
steps { steps {
echo 'Building documentation...' 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...') { 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") PLUGINS_SRC_FILES=$(shell find ./src/ij-plugins -name "*.py")
LIPASE_VERSION=1.01 LIPASE_VERSION=1.01
BUILD_ROOT_PATH=$(shell pwd)/build BUILD_ROOT_PATH:=$(shell pwd)/build
PACKAGE_FILE_PATH=$(shell pwd)/lipase-$(LIPASE_VERSION).zip PACKAGE_FILE_PATH=$(BUILD_ROOT_PATH)/lipase-$(LIPASE_VERSION).zip
.PHONY: all .PHONY: all
all: test doc all: test doc
@ -23,7 +23,7 @@ clean_doc:
cd doc; make clean 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; \ pushd ./src; \
mkdir -p $(BUILD_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 ; \
@ -71,10 +71,10 @@ install_ij_opencv:
$(FIJI_ROOT_PATH)/ImageJ-linux64 --update update; \ $(FIJI_ROOT_PATH)/ImageJ-linux64 --update update; \
fi fi
$(PACKAGE_FILE_PATH): $(BUILD_ROOT_PATH)/jars/Lib/fr.univ-rennes1.ipr.lipase.lib.jar $(PLUGINS_SRC_FILES) $(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)/plugins/Ipr ; \ mkdir -p $(BUILD_ROOT_PATH)/ij_zip_source/plugins/Ipr ; \
rsync -a ./src/ij-plugins/Ipr/ $(BUILD_ROOT_PATH)/plugins/Ipr/ ; \ rsync -a ./src/ij-plugins/Ipr/ $(BUILD_ROOT_PATH)/ij_zip_source/plugins/Ipr/ ; \
pushd $(BUILD_ROOT_PATH) ; \ pushd $(BUILD_ROOT_PATH)/ij_zip_source ; \
zip -r $(PACKAGE_FILE_PATH) * ; \ zip -r $(PACKAGE_FILE_PATH) * ; \
popd popd
@ -127,4 +127,3 @@ test: test0001 imgproc_tests
.PHONY: clean .PHONY: clean
clean: clean_doc clean: clean_doc
rm -Rf $(BUILD_ROOT_PATH) rm -Rf $(BUILD_ROOT_PATH)
rm -Rf $(PACKAGE_FILE_PATH)

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/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 LIPASE_USER_MANUAL_PATH=$(pwd)/doc/lipase.pdf
echo "LIPASE_PACKAGE_FILE_PATH=$LIPASE_PACKAGE_FILE_PATH" echo "LIPASE_PACKAGE_FILE_PATH=$LIPASE_PACKAGE_FILE_PATH"
if [ "$GRAFFY_OWNCLOUD_JENKINS_PWD" = '' ] if [ "$GRAFFY_OWNCLOUD_JENKINS_PWD" = '' ]