pipeline{
	agent any

	triggers {
        cron('@daily')
    	}
	
	options {
        buildDiscarder logRotator(numToKeepStr: '20')
        throttleJobProperty( // To prevent the possibility of jobs being invoked multiple times. e.g. During the Release
            categories: [],
            limitOneJobWithMatchingParams: false,
            maxConcurrentPerNode: 0,
            maxConcurrentTotal: 1,
            paramsToUseForLimit: '',
            throttleEnabled: true,
            throttleOption: 'project',
        	)
    	}

	parameters { 
        //string(defaultValue: "https://github.com/jesus-fernandez-delval/Prueba_Jenkins_a.git", description: 'Whats the github URL?', name: 'GITHUB_URL')
		string(defaultValue: "195912/servercore/gs:1.0.0", description: 'Docker image name.version?', name: 'DOCKER_IMAGE_NAME')
		
    }
	stages{
		
		stage ('build docker image'){

				steps{
    				  
						bat ('Call "tools/dockerbuildimage.bat" %DOCKER_IMAGE_NAME%')
				}
			}



	}
}