-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
26 lines (25 loc) · 758 Bytes
/
Jenkinsfile
File metadata and controls
26 lines (25 loc) · 758 Bytes
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
pipeline {
agent any
options {
disableConcurrentBuilds()
timestamps()
}
parameters {
string(name: "Source", defaultValue: "C:", description: "Source drive")
string(name: "Target", defaultValue: "D:", description: "Target drive")
string(name: "Shadow", defaultValue: "B:", description: "Shadow drive")
}
triggers {
cron("0 4 * * *")
}
stages {
stage("Mirror") {
steps {
ps ".\\Mirror.ps1 ${params.Source} ${params.Target} ${params.Shadow}"
}
}
}
}
def ps (String command) {
bat "powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass \"Set-PSDebug -Trace 1; $command\" -Verbose"
}