Skip to content

Commit daa4dbc

Browse files
committed
Upgrade to ES 7.13.0 and release version 7.13.0.0
1 parent 1ed3f5f commit daa4dbc

File tree

4 files changed

+20
-65
lines changed

4 files changed

+20
-65
lines changed

.github/workflows/ci.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on:
1313
- "6.x"
1414

1515
env:
16-
gradle-version: "6.8.2"
17-
java-version: "15"
16+
gradle-version: "7.0.2"
17+
java-version: "16"
1818

1919
jobs:
2020
build:
@@ -36,12 +36,12 @@ jobs:
3636
with:
3737
gradle-version: "${{ env.gradle-version }}"
3838
arguments: "check"
39-
- name: "Gradle release"
39+
- name: "GitHub release"
4040
if: "contains('refs/heads/master refs/heads/5.x refs/heads/6.x', github.ref)"
41-
env:
42-
ORG_GRADLE_PROJECT_github_owner: ${{ github.repository_owner }}
43-
ORG_GRADLE_PROJECT_github_token: ${{ github.token }}
44-
uses: "eskatos/gradle-command-action@v1"
45-
with:
46-
gradle-version: "${{ env.gradle-version }}"
47-
arguments: "release"
41+
run: |
42+
version=$(cat gradle.properties | grep -e "^version *=" | awk -F" *= *" '{print $NF}')
43+
is_snapshot=$(echo ${version} | grep -e "-SNAPSHOT$" | wc -l)
44+
if [ "$is_snapshot" == "0" ]; then
45+
echo ${{ github.token }} | gh auth login --with-token
46+
gh release create ${version} ./build/distributions/*.zip
47+
fi

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ It collects all relevant metrics and makes them available to Prometheus via the
2727

2828
| Elasticsearch | Plugin | Release date |
2929
| -------------- | -------------- | ------------ |
30+
| 7.13.0 | 7.13.0.0 | May 27, 2021 |
3031
| 7.12.1 | 7.12.1.0 | May 01, 2021 |
3132
| 7.12.0 | 7.12.0.0 | Apr 04, 2021 |
3233
| 7.11.2 | 7.11.2.0 | Mar 20, 2021 |
@@ -63,7 +64,7 @@ It collects all relevant metrics and makes them available to Prometheus via the
6364

6465
## Install
6566

66-
`./bin/elasticsearch-plugin install -b https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/7.12.1.0/prometheus-exporter-7.12.1.0.zip`
67+
`./bin/elasticsearch-plugin install -b https://github.com/vvanholl/elasticsearch-prometheus-exporter/releases/download/7.13.0.0/prometheus-exporter-7.13.0.0.zip`
6768

6869
**Do not forget to restart the node after the installation!**
6970

build.gradle

+7-53
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ buildscript {
2323
plugins {
2424
id "java"
2525
id "checkstyle"
26-
id "co.riiid.gradle" version "0.4.2"
2726
}
2827

2928
apply plugin: 'java'
@@ -44,7 +43,7 @@ licenseFile = rootProject.file('LICENSE.txt')
4443
noticeFile = rootProject.file('NOTICE.txt')
4544

4645
// POM validation can be enabled
47-
validateNebulaPom.enabled = false
46+
validateElasticPom.enabled = false
4847

4948
// No unit tests in this plugin
5049
test.enabled = false
@@ -69,6 +68,7 @@ ext {
6968
}
7069

7170
configurations {
71+
runtime
7272
releaseJars {
7373
extendsFrom runtime
7474
exclude group: "org.elasticsearch"
@@ -78,11 +78,11 @@ configurations {
7878
}
7979

8080
dependencies {
81-
compile "org.elasticsearch:elasticsearch:${versions.elasticsearch}"
82-
compile "io.prometheus:simpleclient:${versions.prometheus}"
83-
compile "io.prometheus:simpleclient_common:${versions.prometheus}"
84-
compile "org.apache.logging.log4j:log4j-api:${versions.log4j}"
85-
testCompile (group: 'junit', name: 'junit', version: "${versions.junit}") {
81+
api "org.elasticsearch:elasticsearch:${versions.elasticsearch}"
82+
api "io.prometheus:simpleclient:${versions.prometheus}"
83+
api "io.prometheus:simpleclient_common:${versions.prometheus}"
84+
api "org.apache.logging.log4j:log4j-api:${versions.log4j}"
85+
testImplementation (group: 'junit', name: 'junit', version: "${versions.junit}") {
8686
exclude group:'org.hamcrest' //also included in ES test framework
8787
}
8888
releaseJars "${project.group}:${project.name}:${project.version}"
@@ -100,12 +100,6 @@ esplugin {
100100
classname pluginClassname
101101
}
102102

103-
restResources {
104-
restApi {
105-
includeCore '*'
106-
}
107-
}
108-
109103
testClusters.all {
110104
numberOfNodes = 2
111105

@@ -126,43 +120,3 @@ checkstyle {
126120
configFile = new File(rootDir, "checkstyle.xml")
127121
toolVersion = "8.2"
128122
}
129-
130-
def getGitCommitHash() {
131-
def gitFolderPath = "$projectDir/.git/"
132-
def gitFolder = new File(gitFolderPath + "HEAD");
133-
if (!gitFolder.exists()) {
134-
return null
135-
}
136-
137-
def head = gitFolder.text.split(":")
138-
def isCommit = (head.length == 1)
139-
140-
if (isCommit) {
141-
return head[0].trim()
142-
}
143-
144-
def refHead = new File(gitFolderPath + head[1].trim())
145-
return refHead.text.trim()
146-
}
147-
148-
github {
149-
owner = github_owner
150-
repo = github_repo
151-
token = github_token
152-
tagName = version
153-
targetCommitish = getGitCommitHash()
154-
name = version
155-
assets = [
156-
"build/distributions/${project.name}-${version}.zip"
157-
]
158-
}
159-
160-
task release() {
161-
if (version.endsWith("-SNAPSHOT")) {
162-
doLast {
163-
println("SNAPSHOT: Nothing to release !")
164-
}
165-
} else {
166-
dependsOn(["githubRelease"])
167-
}
168-
}

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
group = org.elasticsearch.plugin.prometheus
22

3-
version = 7.12.1.1-SNAPSHOT
3+
version = 7.13.0.0
44

55
pluginName = prometheus-exporter
66
pluginClassname = org.elasticsearch.plugin.prometheus.PrometheusExporterPlugin

0 commit comments

Comments
 (0)