Skip to content

Commit

Permalink
Make packer cache branches explicit (#41990)
Browse files Browse the repository at this point in the history
Before this change we would recurse to cache bwc versions.
This proved to be problematic due to  the number of steps it was
generating taking too long.
Also this required tricky maintenance to break the recursion for old
branches we don't really care about.

With this change we now cache specific branches only.
  • Loading branch information
alpar-t committed May 27, 2019
1 parent 1b64860 commit ea18e3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ export JAVA8_HOME="${HOME}"/.java/java8
export JAVA11_HOME="${HOME}"/.java/java11
export JAVA12_HOME="${HOME}"/.java/java12
./gradlew --parallel clean --scan -Porg.elasticsearch.acceptScanTOS=true -s resolveAllDependencies

7 changes: 5 additions & 2 deletions distribution/bwc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,15 @@ bwcVersions.forPreviousUnreleased { VersionCollection.UnreleasedVersionInfo unre

createBuildBwcTask(projectName, "${baseDir}/${projectName}", projectArtifact)
}


createRunBwcGradleTask("resolveAllBwcDependencies") {
args 'resolveAllDependencies'
}
resolveAllDependencies.dependsOn resolveAllBwcDependencies
Version currentVersion = Version.fromString(version)
if (currentVersion.getMinor() == 0 && currentVersion.getRevision() == 0) {
// We only want to resolve dependencies for live versions of master, without cascading this to older versions
resolveAllDependencies.dependsOn resolveAllBwcDependencies
}

for (e in artifactFiles) {
String projectName = e.key
Expand Down

0 comments on commit ea18e3c

Please sign in to comment.