Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Branch_1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

print("Multi branch Pipeline : Branch 1")
39 changes: 22 additions & 17 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
pipeline {
agent {
agent {
node {
label 'docker-agent-python'
}
}
label 'jenkins-agent-python'
}
}
triggers {
pollSCM '* * * * *'
pollSCM('H/10 * * * *')
}
options {
disableConcurrentBuilds()
}
stages {
stage('Build') {
steps {
echo "Building.."
sh '''
cd myapp
pip install -r requirements.txt
'''
dir('myapp') {
sh '''
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
'''
}
}
}
stage('Test') {
steps {
echo "Testing.."
echo "Testing Master Branch..."
sh '''
cd myapp
. venv/bin/activate
python3 hello.py
python3 hello.py --name=Brad
python3 hello.py --name=Sai
'''
}
}
stage('Deliver') {
steps {
echo 'Deliver....'
sh '''
echo "doing delivery stuff.."
'''
echo 'Delivering Master Branch...'
sh 'echo "Master Branch delivery logic..."'
}
}
}
}
}
2 changes: 0 additions & 2 deletions helloworld.py

This file was deleted.