Initial commit
This commit is contained in:
Vendored
+51
@@ -0,0 +1,51 @@
|
||||
pipeline {
|
||||
agent any
|
||||
environment {
|
||||
}
|
||||
stages {
|
||||
stage('Restore packages') {
|
||||
steps {
|
||||
sh 'dotnet restore ${WORKSPACE}/RazorApp.csproj'
|
||||
}
|
||||
}
|
||||
stage('Clean') {
|
||||
steps {
|
||||
sh 'dotnet clean ${WORKSPACE}/RazorApp.csproj --configuration Release'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'dotnet build ${WORKSPACE}/RazorApp.csproj --configuration Release --no-restore'
|
||||
}
|
||||
}
|
||||
/*stage('Test') {
|
||||
steps {
|
||||
sh 'dotnet test ${WORKSPACE}/RazorApp.csproj --no-restore'
|
||||
}
|
||||
}*/
|
||||
stage('Publish') {
|
||||
steps {
|
||||
sh 'dotnet publish ${WORKSPACE} -o out --configuration Release --no-restore'
|
||||
}
|
||||
|
||||
}
|
||||
stage ('Deploy') {
|
||||
steps {
|
||||
sh 'sudo /root/jenkins_scripts/qa_deploy ${WORKSPACE}/out'
|
||||
}
|
||||
}
|
||||
}
|
||||
post{
|
||||
success{
|
||||
emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}",
|
||||
recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
|
||||
subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}"
|
||||
}
|
||||
always {
|
||||
deleteDir()
|
||||
}
|
||||
cleanup {
|
||||
cleanWs()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user