forked from FeynmanFan/JenkinsGroovy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkinsfile
34 lines (34 loc) · 863 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
node ('DOTNETCORE') {
stage('SCM') {
echo 'Gathering code from version control'
git branch: '${branch}', url: 'https://github.com/S0meth1ng85/JenkinsGroovy.git'
}
@Library('getgroovy')
stage('Build') {
try{
echo 'Building....'
sh 'dotnet --version'
sh "dotnet build ConsoleApp1"
echo 'Building New Feature'
sh(getGroovy() + ' --version')
releasenotes()
}catch(ex){
echo 'Something went wrong'
echo ex.toString();
currentBuild.result = 'FAILURE'
}
finally{
//cleanup
}
}
stage('Test') {
echo 'Testing....'
}
stage('Deploy') {
echo 'Deploying....'
}
stage('Archive') {
echo 'Archiving....'
archiveArtifacts artifacts: '/var/jenkins_home/workspace/AutomatingGroovy/*.*', fingerprint: true
}
}