Building CI/CD workflows using declarative and scripted pipelines
← Back to Linux Basics and DevOps Automations PageA Jenkins pipeline is a set of automated processes for building, testing, and deploying software. Pipelines define the entire CI/CD workflow as code.
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building application...'
}
}
stage('Test') {
steps {
echo 'Running tests...'
}
}
stage('Deploy') {
steps {
echo 'Deploying to production...'
}
}
}
post {
success {
echo 'Pipeline completed successfully!'
}
failure {
echo 'Pipeline failed.'
}
}
}