diff --git a/.jenkins/jenkinsfile b/.jenkins/jenkinsfile index 3b611d1..d72446f 100644 --- a/.jenkins/jenkinsfile +++ b/.jenkins/jenkinsfile @@ -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" }