Add printing debug messages during Jenkins master start
This commit is contained in:
		
							parent
							
								
									c51fab9a2c
								
							
						
					
					
						commit
						044c0890c2
					
				| 
						 | 
					@ -244,6 +244,17 @@ var initBashTemplate = template.Must(template.New(InitScriptName).Parse(`#!/usr/
 | 
				
			||||||
set -e
 | 
					set -e
 | 
				
			||||||
set -x
 | 
					set -x
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "${DEBUG}" == "true" ]; then
 | 
				
			||||||
 | 
						echo "Printing debug messages - begin"
 | 
				
			||||||
 | 
						whoami
 | 
				
			||||||
 | 
						id
 | 
				
			||||||
 | 
						env
 | 
				
			||||||
 | 
						ls -la {{ .JenkinsHomePath }}
 | 
				
			||||||
 | 
						echo "Printing debug messages - end"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    echo "To print debug messages set environment variable 'DEBUG' to 'true'"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# https://wiki.jenkins.io/display/JENKINS/Post-initialization+script
 | 
					# https://wiki.jenkins.io/display/JENKINS/Post-initialization+script
 | 
				
			||||||
mkdir -p {{ .JenkinsHomePath }}/init.groovy.d
 | 
					mkdir -p {{ .JenkinsHomePath }}/init.groovy.d
 | 
				
			||||||
cp -n {{ .InitConfigurationPath }}/*.groovy {{ .JenkinsHomePath }}/init.groovy.d
 | 
					cp -n {{ .InitConfigurationPath }}/*.groovy {{ .JenkinsHomePath }}/init.groovy.d
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue