-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
40 lines (35 loc) · 1.22 KB
/
Jenkinsfile
File metadata and controls
40 lines (35 loc) · 1.22 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
options {
timeout(time: 3, unit: 'MINUTES') // Safety valve for Mainframe-Devops-Project
ansiColor('xterm') // This turns the Zowe junk codes into colors
}
environment {
// This ID must match the one you created in the Jenkins Credentials vault
MF_CREDS = credentials('mainframe-auth')
// This ID must match your GitHub token credential
GIT_CREDS = credentials('github-auth')
}
stages {
stage('Pull from GitHub') {
steps {
echo 'Pulling fresh Mainframe Automation Code...'
git branch: 'main',
credentialsId: 'github-auth',
url: 'https://github.com/AtherShakeel/Mainframe-DevOps-Project'
}
}
stage('Mainframe Automation') {
steps {
echo 'Starting Mainframe Deployment and Test...'
// Jenkins fills %MF_CREDS_USR% and %MF_CREDS_PSW% automatically
bat "python deploy-automation.py --user %MF_CREDS_USR% --passw %MF_CREDS_PSW%"
}
}
}
post {
always {
echo 'Pipeline finished. Check logs for details.'
}
}
}