Selector/.jenkins/jenkinsfile

63 lines
1.8 KiB
Plaintext

pipeline {
agent any
stages {
stage('Build C#') {
agent {
docker {
image 'mcr.microsoft.com/dotnet/sdk:7.0'
// Run the container on the node specified at the
// top-level of the Pipeline, in the same workspace,
// rather than on a new node entirely:
reuseNode true
}
}
steps {
dotnetRestore project: "Selector.Core.sln"
dotnetBuild project: "Selector.Core.sln"
}
}
stage('Build Javascript') {
agent {
docker {
image 'node:16'
// Run the container on the node specified at the
// top-level of the Pipeline, in the same workspace,
// rather than on a new node entirely:
reuseNode true
}
}
steps {
dir ('Selector.Web') {
sh "npm ci"
sh "npm run build --if-present"
}
}
}
stage('Test') {
agent {
docker {
image 'mcr.microsoft.com/dotnet/sdk:7.0'
// Run the container on the node specified at the
// top-level of the Pipeline, in the same workspace,
// rather than on a new node entirely:
reuseNode true
}
}
steps {
dotnetTest project: "Selector.Core.sln"
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
post {
always {
cleanWs()
}
}
}