From daa4dbc4fbaaef1f655759dfe6075e95ac01b0c5 Mon Sep 17 00:00:00 2001 From: Vincent VAN HOLLEBEKE Date: Sat, 29 May 2021 09:46:14 +0200 Subject: [PATCH] Upgrade to ES 7.13.0 and release version 7.13.0.0 --- .github/workflows/ci.yml | 20 +++++++------- README.md | 3 +- build.gradle | 60 +++++----------------------------------- gradle.properties | 2 +- 4 files changed, 20 insertions(+), 65 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21bf1f91..c7c4cfaa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,8 @@ on: - "6.x" env: - gradle-version: "6.8.2" - java-version: "15" + gradle-version: "7.0.2" + java-version: "16" jobs: build: @@ -36,12 +36,12 @@ jobs: with: gradle-version: "${{ env.gradle-version }}" arguments: "check" - - name: "Gradle release" + - name: "GitHub release" if: "contains('refs/heads/master refs/heads/5.x refs/heads/6.x', github.ref)" - env: - ORG_GRADLE_PROJECT_github_owner: ${{ github.repository_owner }} - ORG_GRADLE_PROJECT_github_token: ${{ github.token }} - uses: "eskatos/gradle-command-action@v1" - with: - gradle-version: "${{ env.gradle-version }}" - arguments: "release" + run: | + version=$(cat gradle.properties | grep -e "^version *=" | awk -F" *= *" '{print $NF}') + is_snapshot=$(echo ${version} | grep -e "-SNAPSHOT$" | wc -l) + if [ "$is_snapshot" == "0" ]; then + echo ${{ github.token }} | gh auth login --with-token + gh release create ${version} ./build/distributions/*.zip + fi diff --git a/README.md b/README.md index 914c7dcc..ea38278c 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ It collects all relevant metrics and makes them available to Prometheus via the | Elasticsearch | Plugin | Release date | | -------------- | -------------- | ------------ | +| 7.13.0 | 7.13.0.0 | May 27, 2021 | | 7.12.1 | 7.12.1.0 | May 01, 2021 | | 7.12.0 | 7.12.0.0 | Apr 04, 2021 | | 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 ## Install -`./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` +`./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` **Do not forget to restart the node after the installation!** diff --git a/build.gradle b/build.gradle index 9f1857ed..5cd9da6b 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,6 @@ buildscript { plugins { id "java" id "checkstyle" - id "co.riiid.gradle" version "0.4.2" } apply plugin: 'java' @@ -44,7 +43,7 @@ licenseFile = rootProject.file('LICENSE.txt') noticeFile = rootProject.file('NOTICE.txt') // POM validation can be enabled -validateNebulaPom.enabled = false +validateElasticPom.enabled = false // No unit tests in this plugin test.enabled = false @@ -69,6 +68,7 @@ ext { } configurations { + runtime releaseJars { extendsFrom runtime exclude group: "org.elasticsearch" @@ -78,11 +78,11 @@ configurations { } dependencies { - compile "org.elasticsearch:elasticsearch:${versions.elasticsearch}" - compile "io.prometheus:simpleclient:${versions.prometheus}" - compile "io.prometheus:simpleclient_common:${versions.prometheus}" - compile "org.apache.logging.log4j:log4j-api:${versions.log4j}" - testCompile (group: 'junit', name: 'junit', version: "${versions.junit}") { + api "org.elasticsearch:elasticsearch:${versions.elasticsearch}" + api "io.prometheus:simpleclient:${versions.prometheus}" + api "io.prometheus:simpleclient_common:${versions.prometheus}" + api "org.apache.logging.log4j:log4j-api:${versions.log4j}" + testImplementation (group: 'junit', name: 'junit', version: "${versions.junit}") { exclude group:'org.hamcrest' //also included in ES test framework } releaseJars "${project.group}:${project.name}:${project.version}" @@ -100,12 +100,6 @@ esplugin { classname pluginClassname } -restResources { - restApi { - includeCore '*' - } -} - testClusters.all { numberOfNodes = 2 @@ -126,43 +120,3 @@ checkstyle { configFile = new File(rootDir, "checkstyle.xml") toolVersion = "8.2" } - -def getGitCommitHash() { - def gitFolderPath = "$projectDir/.git/" - def gitFolder = new File(gitFolderPath + "HEAD"); - if (!gitFolder.exists()) { - return null - } - - def head = gitFolder.text.split(":") - def isCommit = (head.length == 1) - - if (isCommit) { - return head[0].trim() - } - - def refHead = new File(gitFolderPath + head[1].trim()) - return refHead.text.trim() -} - -github { - owner = github_owner - repo = github_repo - token = github_token - tagName = version - targetCommitish = getGitCommitHash() - name = version - assets = [ - "build/distributions/${project.name}-${version}.zip" - ] -} - -task release() { - if (version.endsWith("-SNAPSHOT")) { - doLast { - println("SNAPSHOT: Nothing to release !") - } - } else { - dependsOn(["githubRelease"]) - } -} diff --git a/gradle.properties b/gradle.properties index 4d95e596..ffa6c0a3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ group = org.elasticsearch.plugin.prometheus -version = 7.12.1.1-SNAPSHOT +version = 7.13.0.0 pluginName = prometheus-exporter pluginClassname = org.elasticsearch.plugin.prometheus.PrometheusExporterPlugin