Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set agent in matrix block instead of child stages #441

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions .cicd/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ pipeline {
}
}

agent {
label env.SRW_PLATFORM
}

environment {
BRANCH_NAME_ESCAPED = env.BRANCH_NAME.replace('/', '_')
BUILD_VERSION = "${env.SRW_PLATFORM}-${env.SRW_COMPILER}-${env.BRANCH_NAME_ESCAPED}-${env.BUILD_NUMBER}"
Expand All @@ -109,12 +113,8 @@ pipeline {
stages {
// Clean the workspace, checkout the repository, and run checkout_externals
stage('Initialize') {
agent {
label env.SRW_PLATFORM
}

steps {
echo "Initializing SRW (${env.SRW_COMPILER}) build environment on ${env.SRW_PLATFORM}"
echo "Initializing SRW (${env.SRW_COMPILER}) build environment on ${env.SRW_PLATFORM} (using ${env.WORKSPACE})"
cleanWs()
checkout scm
sh '"${WORKSPACE}/manage_externals/checkout_externals"'
Expand All @@ -123,12 +123,8 @@ pipeline {

// Run the unified build script; if successful create a tarball of the build and upload to S3
stage('Build') {
agent {
label env.SRW_PLATFORM
}

steps {
echo "Building SRW (${env.SRW_COMPILER}) on ${env.SRW_PLATFORM}"
echo "Building SRW (${env.SRW_COMPILER}) on ${env.SRW_PLATFORM} (using ${env.WORKSPACE})"
sh 'bash --login "${WORKSPACE}/.cicd/scripts/srw_build.sh"'
}

Expand All @@ -142,16 +138,12 @@ pipeline {

// Run the unified test script
stage('Test') {
agent {
label env.SRW_PLATFORM
}

environment {
SRW_WE2E_EXPERIMENT_BASE_DIR = "${env.WORKSPACE}/expt_dirs"
}

steps {
echo "Testing SRW (${env.SRW_COMPILER}) on ${env.SRW_PLATFORM}"
echo "Testing SRW (${env.SRW_COMPILER}) on ${env.SRW_PLATFORM} (using ${env.WORKSPACE})"

// If executing for a Pull Request, check for the run_we2e_comprehensive_tests. If set,
// override the value of the SRW_WE2E_COMPREHENSIVE_TESTS parameter
Expand Down