33 lines
		
	
	
		
			851 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			851 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
| pipeline {
 | |
|     agent any
 | |
| 
 | |
|     options {
 | |
|         buildDiscarder(logRotator(numToKeepStr: '2', artifactNumToKeepStr: '4'))
 | |
|         timeout(time: 5, unit: 'MINUTES')
 | |
|     }
 | |
|     triggers {
 | |
|         pollSCM('*/10 * * * *')
 | |
|     }
 | |
|     stages {
 | |
|         stage('Build') {
 | |
|             steps {
 | |
|                 withGradle {
 | |
|                     echo 'Cleaning...'
 | |
|                     sh './gradlew clean'
 | |
|                     sh './gradlew kotlinUpgradeYarnLock'
 | |
|                     echo 'Building..'
 | |
|                     sh './gradlew browserProductionWebpack'
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|         stage('Deploy') {
 | |
|             steps {
 | |
|                 echo 'Deploying....'
 | |
|                 dir('compiledOutput') {
 | |
|                     archiveArtifacts artifacts:'*.html, *.js, *.js.map', fingerprint: false
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 |