Files
RazorApp/Jenkinsfile
T

50 lines
1.3 KiB
Groovy
Raw Normal View History

2021-07-10 08:24:30 +00:00
pipeline {
agent any
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()
}
}
}