Skip to content

Commit

Permalink
fix(ci): Specify agent label and remove beforeAgent
Browse files Browse the repository at this point in the history
These changes are necessary to conform to changes made to our
build system which segment the agents based on app concern.

Fixes: #72
  • Loading branch information
darinspivey committed Jun 29, 2022
1 parent 158a5ea commit 2b1e9c7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ def DEFAULT_BRANCH = 'main'
def CHANGE_ID = env.CHANGE_ID == null ? '' : env.CHANGE_ID

pipeline {
agent none
agent {
node {
label 'ec2-fleet'
}
}

options {
timestamps()
Expand Down Expand Up @@ -58,6 +62,7 @@ pipeline {
agent {
docker {
image "us.gcr.io/logdna-k8s/node:${NODE_VERSION}"
label 'ec2-fleet'
}
}

Expand Down Expand Up @@ -90,7 +95,6 @@ pipeline {

stage('Test Release') {
when {
beforeAgent true
not {
branch DEFAULT_BRANCH
}
Expand All @@ -100,6 +104,7 @@ pipeline {
docker {
image "us.gcr.io/logdna-k8s/node:17-ci"
customWorkspace "${PROJECT_NAME}-${BUILD_NUMBER}"
label 'ec2-fleet'
}
}

Expand All @@ -118,7 +123,6 @@ pipeline {

stage('Release') {
when {
beforeAgent true
branch DEFAULT_BRANCH
not {
changelog '\\[skip ci\\]'
Expand All @@ -129,6 +133,7 @@ pipeline {
docker {
image "us.gcr.io/logdna-k8s/node:17-ci"
customWorkspace "${PROJECT_NAME}-${BUILD_NUMBER}"
label 'ec2-fleet'
}
}

Expand Down

0 comments on commit 2b1e9c7

Please sign in to comment.