A CI/CD Pipeline is a series of steps that must be performed in order to deliver a new version of software. A pipeline typically includes stages for:
1. Building the code
2. Running automated tests
3. Deploying to staging/production environments
Example of a basic Jenkins Pipeline:
<div class="code-block" data-lang="groovy"><div class="highlight"><pre><span></span><span class="n">pipeline</span><span class="w"> </span><span class="o">{</span>
agent any
stages {
stage('Build') {
steps {
sh 'npm install'
sh 'npm run build'
}
}
stage('Test') {
steps {
sh 'npm run test'
}
}
stage('Deploy') {
steps {
sh './deploy.sh'
}
}
}
}