I try to use Jenkins for build and test and want to run my app in the test server. I use pipeline and create this script:
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git credentialsId: 'gitUser', url: 'git-url', branch: 'master'
}
}
stage('Restore PACKAGES') {
steps {
bat "dotnet restore"
}
}
stage('Clean') {
steps {
bat 'dotnet clean'
}
}
stage('Build') {
steps {
bat 'dotnet build --configuration Release'
}
}
stage('Run') {
steps {
bat 'dotnet run --project "myapp.csproj"'
}
}
}
}
everything is ok but when execute dotnet run
pipeline doesn't finish because the application with this command start listening.
what can I do run my app with Jenkins?