[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/Nishvika/sample-java-programs/development/JenkinsFile [Back]  [Original]

pipeline {
    environment {
               JAVA_HOMEO = "/var/Jenkins_Home"
    }
    parameters {
               choice choices: ['Saturday', 'Sunday', 'Monday'], description: 'Enter the Day', name: 'Day'
               choice choices: ['master', 'development', 'feature'], description: 'Enter the branch name', name: 'Branch'
    }
    options {
            buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '5', numToKeepStr: '10')
            timeout(time: 3, unit: 'MINUTES')
    }
    agent any
    tools {
           maven 'maven-tool'
    }

    stages {
        stage('Hello') {
            steps {
                echo 'Hello World'
            }
        }
        stage('sravani') {
            steps {
                git branch: "$params.Branch", url: 'https://github.com/Nishvika/sample-java-programs.git'
                sh 'mvn install'
                echo 'Hello sravani'
                echo "The entered day is $params.Day"
                echo "The environment variable value for JAVA_HOMEO is $JAVA_HOMEO "
               
            }
        }
    }
}

Web Proxy Viewer  |  New URL  |  Original Page