-
Notifications
You must be signed in to change notification settings - Fork 564
/
Copy pathJenkinsfile
36 lines (36 loc) · 1.26 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
pipeline {
agent any
environment {
VERSION = "1.0.0.${BUILD_NUMBER}"
}
stages {
stage('Git Checkout') {
steps {
git branch: 'master', url: 'https://github.com/phongnguyend/Practical.CleanArchitecture'
}
}
stage('Build') {
steps {
sh 'dotnet --info'
echo "BUILD_NUMBER: ${BUILD_NUMBER}"
echo "VERSION: ${VERSION}"
dir('src/Monolith') {
sh 'dotnet clean'
sh "dotnet build -p:Version=${VERSION} --configuration Release"
}
}
}
stage('Publish') {
steps {
dir('src/Monolith') {
sh "dotnet publish -p:Version=${VERSION} ClassifiedAds.Background/*.csproj --configuration Release"
sh "dotnet publish -p:Version=${VERSION} ClassifiedAds.Migrator/*.csproj --configuration Release"
sh "dotnet publish -p:Version=${VERSION} ClassifiedAds.WebAPI/*.csproj --configuration Release"
sh "dotnet publish -p:Version=${VERSION} ClassifiedAds.WebMVC/*.csproj --configuration Release"
sh "dotnet publish -p:Version=${VERSION} ClassifiedAds.BlazorServerSide/*.csproj --configuration Release"
sh "dotnet publish -p:Version=${VERSION} ClassifiedAds.BlazorWebAssembly/*.csproj --configuration Release"
}
}
}
}
}