-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile.Template
More file actions
40 lines (33 loc) · 1.15 KB
/
Jenkinsfile.Template
File metadata and controls
40 lines (33 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pipeline {
agent any
stages {
stage('Load Pipeline') {
steps {
script {
// Clear workspace to avoid leftover files
deleteDir()
// Clone the repository
git branch: 'main', url: 'https://github.com/marahateeq/pipeline-build.git'
// Show current workspace directory
echo "Current workspace directory:"
sh 'pwd'
// List files in the workspace
echo "Workspace content after checkout:"
sh 'ls -l'
// Check for Jenkinsfile.python specifically
sh 'ls -l Jenkinsfile.python || echo "Jenkinsfile.python not found"'
def pipelineScript = load 'Jenkinsfile.python'
pipelineScript.executePipeline()
}
}
}
}
post {
success {
echo 'Pipeline completed successfully!'
}
failure {
echo 'Pipeline failed.'
}
}
}