more global variables
This commit is contained in:
		
							parent
							
								
									7d73129731
								
							
						
					
					
						commit
						55a346c526
					
				
							
								
								
									
										2
									
								
								build/dev/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								build/dev/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@ -1,3 +1,3 @@
 | 
				
			|||||||
stage ('production build') {
 | 
					stage ('build') {
 | 
				
			||||||
    sh 'npm run build'
 | 
					    sh 'npm run build'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										4
									
								
								clone/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								clone/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@ -1,4 +0,0 @@
 | 
				
			|||||||
def loadApp(String addr) {
 | 
					 | 
				
			||||||
        sh 'git clone ${addr} ./'
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										4
									
								
								install/details/Jenkinsfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								install/details/Jenkinsfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					stage('install') {
 | 
				
			||||||
 | 
					    echo 'starting installing'
 | 
				
			||||||
 | 
					    sh 'npm install -d'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										14
									
								
								predeploy/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								predeploy/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							@ -1,18 +1,22 @@
 | 
				
			|||||||
stage ('predeploy') {
 | 
					stage ('predeploy') {
 | 
				
			||||||
    echo 'checking tag'
 | 
					    echo 'checking tag'
 | 
				
			||||||
    script {
 | 
					    script {
 | 
				
			||||||
        if (sh(returnStdout: true, script: "git tag --contains").trim()) {
 | 
					        def tag = sh(returnStdout: true, script: "git tag --contains").trim()
 | 
				
			||||||
            def tag = sh(returnStdout: true, script: "git tag --contains").trim()
 | 
					
 | 
				
			||||||
 | 
					        if (tag) {
 | 
				
			||||||
            echo 'found tag ' + tag
 | 
					            echo 'found tag ' + tag
 | 
				
			||||||
            sh "cd dist ; echo 'mkdir ${tag}; mv ./master/* ./${tag}; rm -r -d ./master; rm version.sh' > version.sh"
 | 
					            def tagNoV = tag.substring(1)
 | 
				
			||||||
 | 
					            sh "cd ${TARGET_FOLDER} ; echo 'mkdir ${tagNoV}; mv ./master/* ./${tagNoV}; rm -r -d ./master; rm ${DEPLOY_VERSION_SH}' > ${DEPLOY_VERSION_SH}"
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            echo 'tag not found'
 | 
					            echo 'tag not found'
 | 
				
			||||||
            sh "cd dist ; echo 'rm version.sh' > version.sh"
 | 
					            sh "cd ${TARGET_FOLDER} ; echo 'rm ${DEPLOY_VERSION_SH}' > ${DEPLOY_VERSION_SH}"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
stage ('archiving') {
 | 
					stage ('archiving') {
 | 
				
			||||||
    // Archive the build output artifacts.
 | 
					    // Archive the build output artifacts.
 | 
				
			||||||
    archiveArtifacts artifacts: 'dist/*'
 | 
					    script {
 | 
				
			||||||
 | 
					        archiveArtifacts artifacts: "${TARGET_FOLDER}/*"
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										12
									
								
								template
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								template
									
									
									
									
									
								
							@ -13,7 +13,7 @@ def clone (String repoPath, String folder) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def loadScript (String scriptName) {
 | 
					def loadScript (String scriptName) {
 | 
				
			||||||
    load "tmp--jfiles/${scriptName}/Jenkinsfile"
 | 
					    load "${JEN_FILES_TMP_NAME}/${scriptName}/Jenkinsfile"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pipeline {
 | 
					pipeline {
 | 
				
			||||||
@ -23,13 +23,17 @@ pipeline {
 | 
				
			|||||||
      stage('processing') {
 | 
					      stage('processing') {
 | 
				
			||||||
         steps {
 | 
					         steps {
 | 
				
			||||||
                clean()
 | 
					                clean()
 | 
				
			||||||
                clone('https://aaprimakov@bitbucket.org/jsadvance20201/jenkins', 'tmp--jfiles')
 | 
					                clone(JENKINS_SCRIPTS_URL, JEN_FILES_TMP_NAME)
 | 
				
			||||||
                loadScript('stats')
 | 
					                loadScript('stats')
 | 
				
			||||||
                clone('https://aaprimakov@bitbucket.org/jsadvance20201/dev-server', './')
 | 
					                clone('https://aaprimakov@bitbucket.org/aaprimakov/r-and-m', './')
 | 
				
			||||||
 | 
					                loadScript('install')
 | 
				
			||||||
 | 
					                loadScript('build/dev')
 | 
				
			||||||
 | 
					                loadScript('tests/ts')
 | 
				
			||||||
 | 
					                loadScript('tests/ui')
 | 
				
			||||||
                loadScript('publish')
 | 
					                loadScript('publish')
 | 
				
			||||||
 | 
					                loadScript('predeploy')
 | 
				
			||||||
                loadScript('clean-all')
 | 
					                loadScript('clean-all')
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										4
									
								
								tests/ts/Jenkinsfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tests/ts/Jenkinsfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
				
			|||||||
 | 
					stage('unit tests') {
 | 
				
			||||||
 | 
					    echo 'runing ts tests...'
 | 
				
			||||||
 | 
					    sh 'npm run test:ts'
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										0
									
								
								ui/Jenkinsfile → tests/ui/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										0
									
								
								ui/Jenkinsfile → tests/ui/Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user