49 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Groovy
		
	
	
	
			
		
		
	
	
			49 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Groovy
		
	
	
	
| pipeline {
 | |
|     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 {
 | |
|         stage('Initial setup...') {
 | |
|             steps {
 | |
|                 echo 'Initial setup...'
 | |
|                 // 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'
 | |
|             }
 | |
|         }
 | |
|         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 test'
 | |
|             }
 | |
|         }
 | |
|         // stage('Building HTML documentation...') {
 | |
|         //     steps {
 | |
|         //         echo 'Building HTML documentation...'
 | |
|         //         // sh '/bin/bash ./src/CI/CI.bash -d ci_venv'
 | |
|         //     }
 | |
|         // }
 | |
|         stage('Releasing package...') {
 | |
|             steps {
 | |
|                 echo 'Releasing package...'
 | |
|                 sh './scripts/release_lipase_package.bash'
 | |
|                 //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...') {
 | |
|             steps {
 | |
|                 echo 'Cleaning artifacts...'
 | |
|                 sh './scripts/cleanup.bash'
 | |
|                 // sh 'rm -rf ./install_resources'
 | |
|                 // sh 'cd ./src/doc && make clean'
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 |