58 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			58 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			Groovy
		
	
	
	
	
	
pipeline {
 | 
						|
    agent any
 | 
						|
    stages {
 | 
						|
        stage("cleanup") {
 | 
						|
            steps {
 | 
						|
                cleanWs(patterns: [[pattern: '**/bin/Release', type: 'INCLUDE'], [pattern: 'props-linux-x64*', type: 'INCLUDE'], [pattern: 'props-win-x64*', type: 'INCLUDE']])
 | 
						|
            }
 | 
						|
        }
 | 
						|
        stage("Props.Shop") {
 | 
						|
            stages {
 | 
						|
                stage("Restore") {
 | 
						|
                    steps {
 | 
						|
                        dotnetRestore project: "Props.Shop/Props.Shop.sln"
 | 
						|
                        dotnetRestore project: "Props.Shop/Props.Shop.Tests.sln"
 | 
						|
                    }
 | 
						|
                }
 | 
						|
                stage("Test") {
 | 
						|
                    steps {
 | 
						|
                        dotnetTest logger: 'xunit', noRestore: true, project: 'Props.Shop/Props.Shop.Tests.sln', unstableIfErrors: true, unstableIfWarnings: true
 | 
						|
                        xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
 | 
						|
                    }
 | 
						|
                }
 | 
						|
                stage("Publish") {
 | 
						|
                    steps {
 | 
						|
                        dotnetPublish configuration: 'Release', noRestore: true, project: 'Props.Shop/Props.Shop.sln', selfContained: false, unstableIfWarnings: true
 | 
						|
                        fingerprint 'Props.Shop/**/bin/Release/**/publish/Props.Shop.*'
 | 
						|
                        sh "python3 scripts/load_shop_modules.py"
 | 
						|
                    }
 | 
						|
                }
 | 
						|
            }
 | 
						|
        }
 | 
						|
        stage("Props") {
 | 
						|
            stages {
 | 
						|
                stage("Restore") {
 | 
						|
                    steps {
 | 
						|
                        dotnetRestore project: "Props"
 | 
						|
                        dotnetRestore project: "Props.Tests"
 | 
						|
                    }
 | 
						|
                }
 | 
						|
                stage("Test") {
 | 
						|
                    steps {
 | 
						|
                        dotnetTest logger: 'xunit', noRestore: true, project: 'Props.Tests', unstableIfErrors: true, unstableIfWarnings: true
 | 
						|
                        xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
 | 
						|
                    }
 | 
						|
                }
 | 
						|
                stage("Publish") {
 | 
						|
                    steps {
 | 
						|
                        dotnetPublish configuration: 'Release', outputDirectory: 'props-linux-x64', project: 'Props', runtime: 'linux-x64', selfContained: true
 | 
						|
                        dotnetPublish configuration: 'Release', outputDirectory: 'props-win-x64', project: 'Props', runtime: 'win-x64', selfContained: true
 | 
						|
                        fingerprint 'Props/bin/Release/**/publish/Props*'
 | 
						|
                        tar file: "props-linux-x64.tar.gz", archive: true, compress: true, dir: "props-linux-x64"
 | 
						|
                        zip zipFile: "props-win-x64.zip", archive: true, dir: "props-win-x64"
 | 
						|
                    }
 | 
						|
                }
 | 
						|
            }
 | 
						|
        }
 | 
						|
    }
 | 
						|
} |