Skip to content

Commit

Permalink
[7.17] [buildkite] Migrate intake pipeline (#99133) (#99273)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders authored Sep 6, 2023
1 parent 4a2ce03 commit efbbf69
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .buildkite/pipelines/intake.template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
steps:
- label: sanity-check
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-task-input-files precommit
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
- wait
- label: part1
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-task-input-files checkPart1
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
- label: part2
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-task-input-files checkPart2
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
- group: bwc-snapshots
steps:
- label: "{{matrix.BWC_VERSION}} / bwc-snapshots"
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-task-input-files v$$BWC_VERSION#bwcTest
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: $BWC_LIST
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: "{{matrix.BWC_VERSION}}"
- wait
- trigger: elasticsearch-dra-workflow
label: Trigger DRA snapshot workflow
async: true
build:
branch: "$BUILDKITE_BRANCH"
commit: "$BUILDKITE_COMMIT"
env:
DRA_WORKFLOW: snapshot
51 changes: 51 additions & 0 deletions .buildkite/pipelines/intake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# This file is auto-generated. See .buildkite/pipelines/intake.template.yml
steps:
- label: sanity-check
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-task-input-files precommit
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
- wait
- label: part1
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-task-input-files checkPart1
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
- label: part2
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-task-input-files checkPart2
timeout_in_minutes: 300
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
- group: bwc-snapshots
steps:
- label: "{{matrix.BWC_VERSION}} / bwc-snapshots"
command: .ci/scripts/run-gradle.sh -Dbwc.checkout.align=true -Dorg.elasticsearch.build.cache.push=true -Dignore.tests.seed -Dscan.capture-task-input-files v$$BWC_VERSION#bwcTest
timeout_in_minutes: 300
matrix:
setup:
BWC_VERSION: ["6.8.24"]
agents:
provider: gcp
image: family/elasticsearch-ubuntu-2004
machineType: custom-32-98304
buildDirectory: /dev/shm/bk
env:
BWC_VERSION: "{{matrix.BWC_VERSION}}"
- wait
- trigger: elasticsearch-dra-workflow
label: Trigger DRA snapshot workflow
async: true
build:
branch: "$BUILDKITE_BRANCH"
commit: "$BUILDKITE_COMMIT"
env:
DRA_WORKFLOW: snapshot
13 changes: 13 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ tasks.register("updateCIBwcVersions") {
}
}

def writeBuildkiteList = { String outputFilePath, String pipelineTemplatePath, List<Version> versions ->
def outputFile = file(outputFilePath)
def pipelineTemplate = file(pipelineTemplatePath)

def listString = "[" + versions.collect { "\"${it}\"" }.join(", ") + "]"
outputFile.text = "# This file is auto-generated. See ${pipelineTemplatePath}\n" + pipelineTemplate.text.replaceAll('\\$BWC_LIST', listString)
}

def writeBuildkiteSteps = { String outputFilePath, String pipelineTemplatePath, String stepTemplatePath, List<Version> versions ->
def outputFile = file(outputFilePath)
def pipelineTemplate = file(pipelineTemplatePath)
Expand All @@ -91,6 +99,11 @@ tasks.register("updateCIBwcVersions") {
doLast {
writeVersions(file(".ci/bwcVersions"), BuildParams.bwcVersions.allIndexCompatible)
writeVersions(file(".ci/snapshotBwcVersions"), BuildParams.bwcVersions.unreleasedIndexCompatible)
writeBuildkiteList(
".buildkite/pipelines/intake.yml",
".buildkite/pipelines/intake.template.yml",
BuildParams.bwcVersions.unreleasedIndexCompatible
)
writeBuildkiteSteps(
".buildkite/pipelines/periodic.yml",
".buildkite/pipelines/periodic.template.yml",
Expand Down

0 comments on commit efbbf69

Please sign in to comment.