Skip to content

Commit 35c6b60

Browse files
authored
[Build] Remove mentioning ./gradlew assemble to build all distributions (#116400)
This causes problems since this also includes building our wolfi image that is based on a non public available base image resulting in build failure for user without access to the docker registry. We should avoid suggesting using ./gradlew assemble as it builds a tons of stuff unrelated to any distribution. Instead people should be pointed to `./gradlew localDistro`
1 parent e38aa7e commit 35c6b60

File tree

2 files changed

+45
-39
lines changed

2 files changed

+45
-39
lines changed

README.asciidoc

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Elasticsearch is a distributed search and analytics engine, scalable data store
44

55
Use cases enabled by Elasticsearch include:
66

7-
* https://www.elastic.co/search-labs/blog/articles/retrieval-augmented-generation-rag[Retrieval Augmented Generation (RAG)]
7+
* https://www.elastic.co/search-labs/blog/articles/retrieval-augmented-generation-rag[Retrieval Augmented Generation (RAG)]
88
* https://www.elastic.co/search-labs/blog/categories/vector-search[Vector search]
99
* Full-text search
1010
* Logs
@@ -17,7 +17,7 @@ Use cases enabled by Elasticsearch include:
1717
To learn more about Elasticsearch's features and capabilities, see our
1818
https://www.elastic.co/products/elasticsearch[product page].
1919

20-
To access information on https://www.elastic.co/search-labs/blog/categories/ml-research[machine learning innovations] and the latest https://www.elastic.co/search-labs/blog/categories/lucene[Lucene contributions from Elastic], more information can be found in https://www.elastic.co/search-labs[Search Labs].
20+
To access information on https://www.elastic.co/search-labs/blog/categories/ml-research[machine learning innovations] and the latest https://www.elastic.co/search-labs/blog/categories/lucene[Lucene contributions from Elastic], more information can be found in https://www.elastic.co/search-labs[Search Labs].
2121

2222
[[get-started]]
2323
== Get started
@@ -27,20 +27,20 @@ https://www.elastic.co/cloud/as-a-service[Elasticsearch Service on Elastic
2727
Cloud].
2828

2929
If you prefer to install and manage Elasticsearch yourself, you can download
30-
the latest version from
30+
the latest version from
3131
https://www.elastic.co/downloads/elasticsearch[elastic.co/downloads/elasticsearch].
3232

3333
=== Run Elasticsearch locally
3434

35-
////
35+
////
3636
IMPORTANT: This content is replicated in the Elasticsearch repo. See `run-elasticsearch-locally.asciidoc`.
3737
Ensure both files are in sync.
3838
3939
https://github.com/elastic/start-local is the source of truth.
40-
////
40+
////
4141

4242
[WARNING]
43-
====
43+
====
4444
DO NOT USE THESE INSTRUCTIONS FOR PRODUCTION DEPLOYMENTS.
4545
4646
This setup is intended for local development and testing only.
@@ -93,20 +93,20 @@ Use this key to connect to Elasticsearch with a https://www.elastic.co/guide/en/
9393
From the `elastic-start-local` folder, check the connection to Elasticsearch using `curl`:
9494

9595
[source,sh]
96-
----
96+
----
9797
source .env
9898
curl $ES_LOCAL_URL -H "Authorization: ApiKey ${ES_LOCAL_API_KEY}"
9999
----
100100
// NOTCONSOLE
101101

102102
=== Send requests to Elasticsearch
103103

104-
You send data and other requests to Elasticsearch through REST APIs.
105-
You can interact with Elasticsearch using any client that sends HTTP requests,
104+
You send data and other requests to Elasticsearch through REST APIs.
105+
You can interact with Elasticsearch using any client that sends HTTP requests,
106106
such as the https://www.elastic.co/guide/en/elasticsearch/client/index.html[Elasticsearch
107-
language clients] and https://curl.se[curl].
107+
language clients] and https://curl.se[curl].
108108

109-
==== Using curl
109+
==== Using curl
110110

111111
Here's an example curl command to create a new Elasticsearch index, using basic auth:
112112

@@ -149,19 +149,19 @@ print(client.info())
149149

150150
==== Using the Dev Tools Console
151151

152-
Kibana's developer console provides an easy way to experiment and test requests.
152+
Kibana's developer console provides an easy way to experiment and test requests.
153153
To access the console, open Kibana, then go to **Management** > **Dev Tools**.
154154

155155
**Add data**
156156

157-
You index data into Elasticsearch by sending JSON objects (documents) through the REST APIs.
158-
Whether you have structured or unstructured text, numerical data, or geospatial data,
159-
Elasticsearch efficiently stores and indexes it in a way that supports fast searches.
157+
You index data into Elasticsearch by sending JSON objects (documents) through the REST APIs.
158+
Whether you have structured or unstructured text, numerical data, or geospatial data,
159+
Elasticsearch efficiently stores and indexes it in a way that supports fast searches.
160160

161161
For timestamped data such as logs and metrics, you typically add documents to a
162162
data stream made up of multiple auto-generated backing indices.
163163

164-
To add a single document to an index, submit an HTTP post request that targets the index.
164+
To add a single document to an index, submit an HTTP post request that targets the index.
165165

166166
----
167167
POST /customer/_doc/1
@@ -171,19 +171,19 @@ POST /customer/_doc/1
171171
}
172172
----
173173

174-
This request automatically creates the `customer` index if it doesn't exist,
175-
adds a new document that has an ID of 1, and
174+
This request automatically creates the `customer` index if it doesn't exist,
175+
adds a new document that has an ID of 1, and
176176
stores and indexes the `firstname` and `lastname` fields.
177177

178-
The new document is available immediately from any node in the cluster.
178+
The new document is available immediately from any node in the cluster.
179179
You can retrieve it with a GET request that specifies its document ID:
180180

181181
----
182182
GET /customer/_doc/1
183183
----
184184

185185
To add multiple documents in one request, use the `_bulk` API.
186-
Bulk data must be newline-delimited JSON (NDJSON).
186+
Bulk data must be newline-delimited JSON (NDJSON).
187187
Each line must end in a newline character (`\n`), including the last line.
188188

189189
----
@@ -200,15 +200,15 @@ PUT customer/_bulk
200200

201201
**Search**
202202

203-
Indexed documents are available for search in near real-time.
204-
The following search matches all customers with a first name of _Jennifer_
203+
Indexed documents are available for search in near real-time.
204+
The following search matches all customers with a first name of _Jennifer_
205205
in the `customer` index.
206206

207207
----
208208
GET customer/_search
209209
{
210210
"query" : {
211-
"match" : { "firstname": "Jennifer" }
211+
"match" : { "firstname": "Jennifer" }
212212
}
213213
}
214214
----
@@ -223,9 +223,9 @@ data streams, or index aliases.
223223

224224
. Go to **Management > Stack Management > Kibana > Data Views**.
225225
. Select **Create data view**.
226-
. Enter a name for the data view and a pattern that matches one or more indices,
227-
such as _customer_.
228-
. Select **Save data view to Kibana**.
226+
. Enter a name for the data view and a pattern that matches one or more indices,
227+
such as _customer_.
228+
. Select **Save data view to Kibana**.
229229

230230
To start exploring, go to **Analytics > Discover**.
231231

@@ -254,11 +254,6 @@ To build a distribution for another platform, run the related command:
254254
./gradlew :distribution:archives:windows-zip:assemble
255255
----
256256

257-
To build distributions for all supported platforms, run:
258-
----
259-
./gradlew assemble
260-
----
261-
262257
Distributions are output to `distribution/archives`.
263258

264259
To run the test suite, see xref:TESTING.asciidoc[TESTING].
@@ -281,7 +276,7 @@ The https://github.com/elastic/elasticsearch-labs[`elasticsearch-labs`] repo con
281276
[[contribute]]
282277
== Contribute
283278

284-
For contribution guidelines, see xref:CONTRIBUTING.md[CONTRIBUTING].
279+
For contribution guidelines, see xref:CONTRIBUTING.md[CONTRIBUTING].
285280

286281
[[questions]]
287282
== Questions? Problems? Suggestions?

build.gradle

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ import com.avast.gradle.dockercompose.tasks.ComposePull
1313
import com.fasterxml.jackson.databind.JsonNode
1414
import com.fasterxml.jackson.databind.ObjectMapper
1515

16+
import org.elasticsearch.gradle.DistributionDownloadPlugin
1617
import org.elasticsearch.gradle.Version
1718
import org.elasticsearch.gradle.internal.BaseInternalPluginBuildPlugin
1819
import org.elasticsearch.gradle.internal.ResolveAllDependencies
1920
import org.elasticsearch.gradle.internal.info.BuildParams
2021
import org.elasticsearch.gradle.util.GradleUtils
2122
import org.gradle.plugins.ide.eclipse.model.AccessRule
22-
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
23-
import org.elasticsearch.gradle.DistributionDownloadPlugin
2423

2524
import java.nio.file.Files
2625

@@ -89,7 +88,7 @@ class ListExpansion {
8988

9089
// Filters out intermediate patch releases to reduce the load of CI testing
9190
def filterIntermediatePatches = { List<Version> versions ->
92-
versions.groupBy {"${it.major}.${it.minor}"}.values().collect {it.max()}
91+
versions.groupBy { "${it.major}.${it.minor}" }.values().collect { it.max() }
9392
}
9493

9594
tasks.register("updateCIBwcVersions") {
@@ -101,7 +100,10 @@ tasks.register("updateCIBwcVersions") {
101100
}
102101
}
103102

104-
def writeBuildkitePipeline = { String outputFilePath, String pipelineTemplatePath, List<ListExpansion> listExpansions, List<StepExpansion> stepExpansions = [] ->
103+
def writeBuildkitePipeline = { String outputFilePath,
104+
String pipelineTemplatePath,
105+
List<ListExpansion> listExpansions,
106+
List<StepExpansion> stepExpansions = [] ->
105107
def outputFile = file(outputFilePath)
106108
def pipelineTemplate = file(pipelineTemplatePath)
107109

@@ -132,7 +134,12 @@ tasks.register("updateCIBwcVersions") {
132134
// Writes a Buildkite pipeline from a template, and replaces $BWC_STEPS with a list of steps, one for each version
133135
// Useful when you need to configure more versions than are allowed in a matrix configuration
134136
def expandBwcSteps = { String outputFilePath, String pipelineTemplatePath, String stepTemplatePath, List<Version> versions ->
135-
writeBuildkitePipeline(outputFilePath, pipelineTemplatePath, [], [new StepExpansion(templatePath: stepTemplatePath, versions: versions, variable: "BWC_STEPS")])
137+
writeBuildkitePipeline(
138+
outputFilePath,
139+
pipelineTemplatePath,
140+
[],
141+
[new StepExpansion(templatePath: stepTemplatePath, versions: versions, variable: "BWC_STEPS")]
142+
)
136143
}
137144

138145
doLast {
@@ -150,7 +157,11 @@ tasks.register("updateCIBwcVersions") {
150157
new ListExpansion(versions: filterIntermediatePatches(BuildParams.bwcVersions.unreleasedIndexCompatible), variable: "BWC_LIST"),
151158
],
152159
[
153-
new StepExpansion(templatePath: ".buildkite/pipelines/periodic.bwc.template.yml", versions: filterIntermediatePatches(BuildParams.bwcVersions.indexCompatible), variable: "BWC_STEPS"),
160+
new StepExpansion(
161+
templatePath: ".buildkite/pipelines/periodic.bwc.template.yml",
162+
versions: filterIntermediatePatches(BuildParams.bwcVersions.indexCompatible),
163+
variable: "BWC_STEPS"
164+
),
154165
]
155166
)
156167

@@ -302,7 +313,7 @@ allprojects {
302313
if (project.path.startsWith(":x-pack:")) {
303314
if (project.path.contains("security") || project.path.contains(":ml")) {
304315
tasks.register('checkPart4') { dependsOn 'check' }
305-
} else if (project.path == ":x-pack:plugin" || project.path.contains("ql") || project.path.contains("smoke-test")) {
316+
} else if (project.path == ":x-pack:plugin" || project.path.contains("ql") || project.path.contains("smoke-test")) {
306317
tasks.register('checkPart3') { dependsOn 'check' }
307318
} else if (project.path.contains("multi-node")) {
308319
tasks.register('checkPart5') { dependsOn 'check' }

0 commit comments

Comments
 (0)