From 08931b49ac802dae8c3ff7d789c5c097b6382d67 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 15 Apr 2023 17:19:26 +0200 Subject: [PATCH] ensure all stages run on the same node --- Jenkinsfile | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2548d66..bcc2583 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,31 +1,32 @@ pipeline { - agent any + agent none stages { - stage('Submodules') { - steps { - sh 'git submodule update --init --recursive --force' - } - } - stage('Cake Build') { - steps { - sh 'dotnet tool restore' - // we use xvfb to allow for graphics-dependent tests - sh 'xvfb-run -a dotnet cake --target Publish --branch ' + env.BRANCH_NAME - } - } - stage('Document') { - steps { - sh 'dotnet cake --target Document --branch ' + env.BRANCH_NAME - stash includes: 'Docs/_site/**', name: 'site' + stage('Cake') { + agent any + stages { + stage('Submodules') { + steps { + sh 'git submodule update --init --recursive --force' + } + } + stage('Build') { + steps { + sh 'dotnet tool restore' + // we use xvfb to allow for graphics-dependent tests + sh 'xvfb-run -a dotnet cake --target Publish --branch ' + env.BRANCH_NAME + } + } + stage('Document') { + steps { + sh 'dotnet cake --target Document --branch ' + env.BRANCH_NAME + stash includes: 'Docs/_site/**', name: 'site' + } + } } } stage('Publish Docs') { - agent { - label 'web' - } - when { - branch 'release' - } + agent { label 'web' } + when { branch 'release' } steps { unstash 'site' sh 'rm -rf /var/www/MLEM/*'