Skip to content

Commit

Permalink
[Build] Fix cacheability of discovery-azure-classic (elastic#117806)
Browse files Browse the repository at this point in the history
Also update cache validation scripts
  • Loading branch information
breskeby authored Dec 1, 2024
1 parent 5025f6c commit 3e7159d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .buildkite/scripts/gradle-build-cache-validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

set -euo pipefail

VALIDATION_SCRIPTS_VERSION=2.5.1
VALIDATION_SCRIPTS_VERSION=2.7.1
GRADLE_ENTERPRISE_ACCESS_KEY=$(vault kv get -field=value secret/ci/elastic-elasticsearch/gradle-enterprise-api-key)
export GRADLE_ENTERPRISE_ACCESS_KEY

curl -s -L -O https://github.com/gradle/gradle-enterprise-build-validation-scripts/releases/download/v$VALIDATION_SCRIPTS_VERSION/gradle-enterprise-gradle-build-validation-$VALIDATION_SCRIPTS_VERSION.zip && unzip -q -o gradle-enterprise-gradle-build-validation-$VALIDATION_SCRIPTS_VERSION.zip
curl -s -L -O https://github.com/gradle/gradle-enterprise-build-validation-scripts/releases/download/v$VALIDATION_SCRIPTS_VERSION/develocity-gradle-build-validation-$VALIDATION_SCRIPTS_VERSION.zip && unzip -q -o develocity-gradle-build-validation-$VALIDATION_SCRIPTS_VERSION.zip

# Create a temporary file
tmpOutputFile=$(mktemp)
trap "rm $tmpOutputFile" EXIT

set +e
gradle-enterprise-gradle-build-validation/03-validate-local-build-caching-different-locations.sh -r https://github.com/elastic/elasticsearch.git -b $BUILDKITE_BRANCH --gradle-enterprise-server https://gradle-enterprise.elastic.co -t precommit --fail-if-not-fully-cacheable | tee $tmpOutputFile
develocity-gradle-build-validation/03-validate-local-build-caching-different-locations.sh -r https://github.com/elastic/elasticsearch.git -b $BUILDKITE_BRANCH --develocity-server https://gradle-enterprise.elastic.co -t precommit --fail-if-not-fully-cacheable | tee $tmpOutputFile
# Capture the return value
retval=$?
set -e
Expand Down
3 changes: 2 additions & 1 deletion plugins/discovery-azure-classic/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ TaskProvider createKey = tasks.register("createKey", LoggedExec) {
outputs.file(keystore).withPropertyName('keystoreFile')
executable = "${buildParams.runtimeJavaHome.get()}/bin/keytool"
getStandardInput().set('FirstName LastName\nUnit\nOrganization\nCity\nState\nNL\nyes\n\n')
String keystorePath = projectDir.toPath().relativize(keystore.toPath()).toString()
args '-genkey',
'-alias', 'test-node',
'-keystore', keystore,
'-keystore', keystorePath,
'-keyalg', 'RSA',
'-keysize', '2048',
'-validity', '712',
Expand Down

0 comments on commit 3e7159d

Please sign in to comment.