Add Jenkins pipeline for build and deployment

This commit is contained in:
pavan-msys 2026-05-05 12:08:42 +05:30 committed by GitHub
parent 7fd1a60b01
commit 1bd87090fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

37
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,37 @@
pipeline {
agent any
stages {
stage('Info') {
steps {
echo "Branch: ${env.BRANCH_NAME}"
echo "PR ID: ${env.CHANGE_ID}"
echo "Target: ${env.CHANGE_TARGET}"
}
}
stage('Build') {
steps {
sh 'echo "Building..."'
}
}
stage('Test') {
steps {
sh 'echo "Running tests..."'
}
}
stage('Deploy') {
when {
expression {
env.CHANGE_ID == null &&
(env.BRANCH_NAME == 'main' || env.BRANCH_NAME == 'master')
}
}
steps {
echo "🚀 Deploying from ${env.BRANCH_NAME}"
}
}
}
}