testing running from inside containers

This commit is contained in:
Andy Pack 2023-04-24 09:00:16 +01:00
parent 4de99650a6
commit 0bd7bee2a8
Signed by: sarsoo
GPG Key ID: A55BA3536A5E0ED7

View File

@ -3,6 +3,15 @@ pipeline {
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"
@ -10,6 +19,15 @@ pipeline {
}
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"
@ -18,6 +36,15 @@ pipeline {
}
}
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"
}