forked from hakkiogretmen/myFirstNetCoreApplication
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
45 lines (44 loc) · 897 Bytes
/
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
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git url: 'https://github.com/hakkiogretmen/myFirstNetCoreApplication.git', branch: 'master'
}
}
stage('Prepare agent'){
steps {
ansiblePlaybook(
playbook : 'playbooks/testplaybook.yaml',
become: true)
}
}
stage('Restore PACKAGES') {
steps {
sh "dotnet restore"
}
}
stage('Clean') {
steps {
sh 'dotnet clean'
}
}
stage('Build') {
steps {
sh 'dotnet build --configuration Release'
}
}
stage('Copy DockerFile to Release folder') {
steps {
sh 'cp Dockerfile2 bin/Release/Dockerfile2'
sh 'cp kubedeployment.yaml bin/Release/kubedeployment.yaml'
sh 'cp -r wwwroot/images bin/Release/netcoreapp2.1/images/'
}
}
stage('Archive') {
steps {
archive 'bin/Release/**'
}
}
}
}