@@ -15,6 +15,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
1515
1616import org.elasticsearch.gradle.DistributionDownloadPlugin
1717import org.elasticsearch.gradle.Version
18+ import org.elasticsearch.gradle.VersionProperties
1819import org.elasticsearch.gradle.internal.BaseInternalPluginBuildPlugin
1920import org.elasticsearch.gradle.internal.ResolveAllDependencies
2021import org.elasticsearch.gradle.util.GradleUtils
@@ -120,10 +121,10 @@ tasks.register("updateCIBwcVersions") {
120121 outputFile. text = " # This file is auto-generated. See ${ pipelineTemplatePath} \n " + pipeline
121122 }
122123
123- // Writes a Buildkite pipelime from a template, and replaces $BWC_LIST with an array of versions
124+ // Writes a Buildkite pipelime from a template, and replaces a variable with an array of versions
124125 // Useful for writing a list of versions in a matrix configuration
125- def expandBwcList = { String outputFilePath , String pipelineTemplatePath , List<Version > versions ->
126- writeBuildkitePipeline(outputFilePath, pipelineTemplatePath, [new ListExpansion (versions : versions, variable : " BWC_LIST " )])
126+ def expandList = { String outputFilePath , String pipelineTemplatePath , String variable , List<Version > versions ->
127+ writeBuildkitePipeline(outputFilePath, pipelineTemplatePath, [new ListExpansion (versions : versions, variable : variable )])
127128 }
128129
129130 // Writes a Buildkite pipeline from a template, and replaces $BWC_STEPS with a list of steps, one for each version
@@ -140,11 +141,18 @@ tasks.register("updateCIBwcVersions") {
140141 doLast {
141142 writeVersions(file(" .ci/bwcVersions" ), filterIntermediatePatches(buildParams. bwcVersions. indexCompatible))
142143 writeVersions(file(" .ci/snapshotBwcVersions" ), filterIntermediatePatches(buildParams. bwcVersions. unreleasedIndexCompatible))
143- expandBwcList (
144+ expandList (
144145 " .buildkite/pipelines/intake.yml" ,
145146 " .buildkite/pipelines/intake.template.yml" ,
147+ " BWC_LIST" ,
146148 filterIntermediatePatches(buildParams. bwcVersions. unreleasedIndexCompatible)
147149 )
150+ expandList(
151+ " .buildkite/pipelines/periodic-fwc.yml" ,
152+ " .buildkite/pipelines/periodic-fwc.template.yml" ,
153+ " FWC_LIST" ,
154+ buildParams. bwcVersions. released. findAll { it. major == VersionProperties . elasticsearchVersion. major && it. minor == VersionProperties . elasticsearchVersion. minor }
155+ )
148156 writeBuildkitePipeline(
149157 " .buildkite/pipelines/periodic.yml" ,
150158 " .buildkite/pipelines/periodic.template.yml" ,
0 commit comments