Няма описание
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. pipeline {
  2. agent any
  3. stages {
  4. stage('Restore packages') {
  5. steps {
  6. sh 'dotnet restore ${WORKSPACE}/RazorApp.csproj'
  7. }
  8. }
  9. stage('Clean') {
  10. steps {
  11. sh 'dotnet clean ${WORKSPACE}/RazorApp.csproj --configuration Release'
  12. }
  13. }
  14. stage('Build') {
  15. steps {
  16. sh 'dotnet build ${WORKSPACE}/RazorApp.csproj --configuration Release --no-restore'
  17. }
  18. }
  19. /*stage('Test') {
  20. steps {
  21. sh 'dotnet test ${WORKSPACE}/RazorApp.csproj --no-restore'
  22. }
  23. }*/
  24. stage('Publish') {
  25. steps {
  26. sh 'dotnet publish ${WORKSPACE} -o out --configuration Release --no-restore'
  27. }
  28. }
  29. stage ('Deploy') {
  30. steps {
  31. sh 'sudo /root/jenkins_scripts/qa_deploy ${WORKSPACE}/out'
  32. }
  33. }
  34. }
  35. post{
  36. success{
  37. emailext body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}",
  38. recipientProviders: [[$class: 'DevelopersRecipientProvider'], [$class: 'RequesterRecipientProvider']],
  39. subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}"
  40. }
  41. always {
  42. deleteDir()
  43. }
  44. cleanup {
  45. cleanWs()
  46. }
  47. }
  48. }