mirror of
				https://github.com/vyos/vyos-build.git
				synced 2025-10-01 20:28:40 +02:00 
			
		
		
		
	Jenkins: lib: move buildDiscarder settings to pipeline ~options
This commit is contained in:
		
							parent
							
								
									222a7d7f47
								
							
						
					
					
						commit
						277561ae26
					
				@ -21,12 +21,6 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
 | 
			
		||||
    // - buildCmd: replace default build command "dpkg-buildpackage -uc -us -tc -b"
 | 
			
		||||
    //   with this custom version
 | 
			
		||||
 | 
			
		||||
    // Only keep the 10 most recent builds
 | 
			
		||||
    def projectProperties = [
 | 
			
		||||
        [$class: 'BuildDiscarderProperty',strategy: [$class: 'LogRotator', numToKeepStr: '10']],
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    properties(projectProperties)
 | 
			
		||||
    setDescription(description)
 | 
			
		||||
 | 
			
		||||
    pipeline {
 | 
			
		||||
@ -36,6 +30,7 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
 | 
			
		||||
            skipDefaultCheckout()
 | 
			
		||||
            timeout(time: 120, unit: 'MINUTES')
 | 
			
		||||
            timestamps()
 | 
			
		||||
            buildDiscarder(logRotator(numToKeepStr: '20'))
 | 
			
		||||
        }
 | 
			
		||||
        stages {
 | 
			
		||||
            stage('Define Agent') {
 | 
			
		||||
@ -126,8 +121,8 @@ def call(description=null, pkgList=null, buildCmd=null, buildArm=false) {
 | 
			
		||||
            }
 | 
			
		||||
            stage("Finalize") {
 | 
			
		||||
                agent {
 | 
			
		||||
                            label "ec2_amd64"
 | 
			
		||||
                        }
 | 
			
		||||
                    label "ec2_amd64"
 | 
			
		||||
                }
 | 
			
		||||
                steps {
 | 
			
		||||
                    script {
 | 
			
		||||
                        // Unpack files for amd64
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user