-
Notifications
You must be signed in to change notification settings - Fork 20
/
Jenkinsfile
52 lines (45 loc) · 1.22 KB
/
Jenkinsfile
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
41
42
43
44
45
46
47
48
49
50
51
52
pipeline {
agent any
environment {
DOTNET_CLI_HOME = "C:\\Program Files\\dotnet"
}
stages {
stage('Checkout') {
steps {
checkout scm
}
}
stage('Build') {
steps {
script {
// Restoring dependencies
//bat "cd ${DOTNET_CLI_HOME} && dotnet restore"
bat "dotnet restore"
// Building the application
bat "dotnet build --configuration Release"
}
}
}
stage('Test') {
steps {
script {
// Running tests
bat "dotnet test --no-restore --configuration Release"
}
}
}
stage('Publish') {
steps {
script {
// Publishing the application
bat "dotnet publish --no-restore --configuration Release --output .\\publish"
}
}
}
}
post {
success {
echo 'Build, test, and publish successful!'
}
}
}