A Jenkinsfile is a text file that contains the definition of a Jenkins Pipeline and is checked into source control. It is used to define a Jenkins Pipeline and execute it as a Jenkins job. It is written using the Groovy DSL.
Example:
node {
stage(‘Checkout’) {
git ‘https://github.com/myorg/myrepo.git’
}
stage(‘Build’) {
sh ‘make’
}
stage(‘Test’) {
sh ‘make test’
}
stage(‘Deploy’) {
sh ‘make deploy’
}
}