Selector/.jenkins/jenkinsfile

63 lines
1.8 KiB
Plaintext
Raw Normal View History

2023-04-24 00:25:01 +01:00
pipeline {
agent any
stages {
stage('Build C#') {
2023-04-24 09:00:16 +01:00
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
}
}
2023-04-24 00:25:01 +01:00
steps {
2023-04-24 00:30:51 +01:00
dotnetRestore project: "Selector.Core.sln"
dotnetBuild project: "Selector.Core.sln"
2023-04-24 00:25:01 +01:00
}
}
stage('Build Javascript') {
2023-04-24 09:00:16 +01:00
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
}
}
2023-04-24 00:25:01 +01:00
steps {
2023-04-24 00:33:55 +01:00
dir ('Selector.Web') {
sh "npm ci"
sh "npm run build --if-present"
}
2023-04-24 00:25:01 +01:00
}
}
stage('Test') {
2023-04-24 09:00:16 +01:00
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
}
}
2023-04-24 00:25:01 +01:00
steps {
2023-04-24 00:30:51 +01:00
dotnetTest project: "Selector.Core.sln"
2023-04-24 00:25:01 +01:00
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
post {
always {
2023-04-24 00:36:09 +01:00
cleanWs()
2023-04-24 00:25:01 +01:00
}
}
}