Skip to content

Commit 194bb5a

Browse files
Update Jenkinsfile to support Python setup on Windows
1 parent df76a84 commit 194bb5a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pipeline/Jenkinsfile

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ pipeline {
1111

1212
stage('Set Up Python') {
1313
steps {
14-
// Set up Python environment
15-
sh 'python3 -m venv venv'
16-
sh '. venv/bin/activate && pip install -r requirements.txt'
14+
// Set up Python environment for Windows
15+
bat 'python -m venv venv'
16+
bat '.\\venv\\Scripts\\activate && pip install -r requirements.txt'
1717
}
1818
}
1919

2020
stage('Run Tests') {
2121
steps {
2222
// Run pytest and generate HTML report
23-
sh '. venv/bin/activate && pytest -v -s --html=reports/Test_Execution_Report.html'
23+
bat '.\\venv\\Scripts\\activate && pytest -v -s --html=reports\\Test_Execution_Report.html'
2424
}
2525
}
2626
}
2727

2828
post {
2929
always {
3030
// Archive test reports
31-
archiveArtifacts artifacts: 'reports/Test_Execution_Report.html', fingerprint: true
31+
archiveArtifacts artifacts: 'reports\\Test_Execution_Report.html', fingerprint: true
3232
}
3333
}
3434
}

0 commit comments

Comments
 (0)