Skip to content

Commit

Permalink
Merge branch '5.5-strapdata' of https://github.com/strapdata/elassand…
Browse files Browse the repository at this point in the history
…ra5-rc into v5.5.0-strapdata
  • Loading branch information
Vincent Royer committed Oct 2, 2017
2 parents 2b4440d + 573e78f commit dee357d
Show file tree
Hide file tree
Showing 22 changed files with 617 additions and 3,621 deletions.
34 changes: 24 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,52 @@ language: java
jdk:
- oraclejdk8

env:
global:
- MVN_SHARED_CACHE=$HOME/.m2
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/

cache:
directories:
- "${MVN_SHARED_CACHE}"
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

before_install:
- mkdir -p ${MVN_SHARED_CACHE}

install: gradle assemble -Dbuild.snapshot=false

script: gradle core:test -Dbuild.snapshot=false

before_deploy:
- export TARBALL=$(ls distribution/tar/build/distributions/elassandra-*.tar.gz)
- export ZIPBALL=$(ls distribution/zip/build/distributions/elassandra-*.zip)
- export DEBPKG=$(ls distribution/deb/build/distributions/elassandra_*.deb)
- export DEBPKG=$(ls distribution/deb/build/distributions/elassandra-*.deb)
- export RPMPKG=$(ls distribution/rpm/build/distributions/elassandra-*.rpm)

deploy:
- provider: releases
overwrite: true
draft: true
draft: false
api_key:
secure: aPWTxkKnO4CWEsH7z775JLFlsO4DrMbkp9thr2F0Ntqi510Y168LbNUEOXEm2LQjb68hAIMHOPFnQp6gCa4AxqcFhAoqmEQqR1Uig6LydCykjNTAzcOSmBA+JE+qhznGX2ZnGCx2UdyODXm34lMJ3c59hblVqwCP7C9ZR1gFx55CjBb17MwxPufPDhON3/NDKEZTAhjklWz3pycXDVm2DX6WzyEeENF69JPklY/bQVXQNZ+0y0AgZnuhdlcZxK29Ou2RqlfzV0UoWYjEt4SvXSLhSdORMD0KbBoN7EElPTAZ4gDE+xtE2Q0TN5IWYBwEq5BTozLs7DjRvZw+HQ5cZEu2kOsbRqHUidtYSSRoaclq+4GYarjhAzJ76ySVcI+KN+2QbiHVP7fULIRCVDGogQZMcpD70oNMntWD3ouYzQMgIE+bmq02vQx7XQHxpd4BdqC2Xa3toddnwtzfOgx5RiGePvHdAIx3n1XRaTS8z+xAH/xLfwBxCVGJVKAuPX6z626BQD41BKpfFI+0cyiJ+Ma87JC8JfJhJnTb59cLp5kebXaHNOghSgL2Y4eh/4g0HTg/mIaQJHcmHWUiMvuUFehW3NsgIFjDXWCle2nauy/1pEUOHOk6P4ZVSaCzHQiu2fFHaD4Wmi1eSPMOYhWr4tEs4qE8c9t4Vnq90A7sxV0=
file:
- "$TARBALL"
- "$ZIPBALL"
- "$DEBPKG"
- "$RPMPKG"
- "$DEBPKG"
skip_cleanup: true
on:
tags: true
repo: strapdata/elassandra

- provider: releases
overwrite: true
draft: false
api_key:
secure: CtTEWfptldC5QoeOl+nseF3uVyjmJglxnk7Mv9qHH4w24/R3GI6Q4TsJxLjp0yf0+ltnE6vg1wERIY5HiE0jvIM3l/ZFUKEFE/f6h9yvmUWFaQD2yOKNKB4fvqYfX0KZWDF0YotMi3bweegrXS66fu5s3jfjXH6DLNmzGjv0cAcumdppJDUOmETktIlWr86KKRJMuYTXiJIe4CXLfgkZEEY7cYsHysrfJvYBPYka9n4kzlcj0PB3Ux4mT8flMLIzfFymnxGWXv2Ubf1DJpCtfyb65OqFqMcWL1NjL+T2Z3OoWI5QgMtoapHX6Z6xuoBQbnN+PR5dq7pmUXJKXpoEsBzfMdv8FpiPS/NV1iRIEzgpab7nIuQ00QDkTA6R+69ugGpwOnaceoNIMnjOQjfaAHT6Xfc4vByFhhZxSp1H6hmdhtaksE1U1w4HMfHnejXTLCNMnsnbmDW1Tygjyu/zI7t9lCeF5kpnbXDV+oBHKxGR6yBZjVbG49Y3IQY7WFoFUKBgkCgYWqFMnLzCwVaJfqTFjQHOzhp1vg+RTgAtTWhjeWKwm9HqSH+R6F6tbhwKdPCDOOdzEAksnwmqUqi4iz8vjTsoiU86WXgds3PDVk4IK6ZxGRJ/UabQz/krXgay1dWOBVRYr4FzP+a5VH7mEyjdW+3SBMztbTw48g65jEE=
file:
- "$TARBALL"
- "$ZIPBALL"
- "$RPMPKG"
- "$DEBPKG"
skip_cleanup: true
on:
tags: true
repo: strapdata/elassandra5-rc
3,896 changes: 431 additions & 3,465 deletions TESTING.asciidoc

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,17 @@ allprojects {
// for backcompat testing
indexCompatVersions = versions
wireCompatVersions = versions.subList(firstMajorIndex, versions.size())

// elassandra adds a 4th digit to the version number
elassVersion = VersionProperties.elassandra
// full version number including the elassandra added digit, and taking care of eventual "-SNAPSHOT" suffix

if (version.endsWith("-SNAPSHOT")) {
fullElassVersion = "${version.minus('-SNAPSHOT')}.${elassVersion}-SNAPSHOT"
}
else {
fullElassVersion = "${version}.${elassVersion}"
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ package org.elasticsearch.gradle
class VersionProperties {
static final String elasticsearch
static final String lucene
static final String elassandra

static final Map<String, String> versions = new HashMap<>()
static {
Properties props = new Properties()
Expand All @@ -34,6 +36,7 @@ class VersionProperties {
props.load(propsStream)
elasticsearch = props.getProperty('elasticsearch')
lucene = props.getProperty('lucene')
elassandra = props.getProperty('elassandra')
for (String property : props.stringPropertyNames()) {
versions.put(property, props.getProperty(property))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class VagrantTestPlugin implements Plugin<Project> {
artifactPattern "https://packagecloud.io/elassandra/latest/packages/el/7/[module]-[revision]-1.noarch.[ext]/download"
}
repos.ivy {
artifactPattern "https://packagecloud.io/elassandra/latest/packages/debian/jessie/[module][revision]-1_all.[ext]/download"
artifactPattern "https://packagecloud.io/elassandra/latest/packages/debian/jessie/[module]_[revision]-1_all.[ext]/download"
}
//*/

Expand Down Expand Up @@ -130,21 +130,23 @@ class VagrantTestPlugin implements Plugin<Project> {
String upgradeFromVersion = System.getProperty("tests.packaging.upgradeVersion");
if (upgradeFromVersion == null) {
//upgradeFromVersion = project.indexCompatVersions[new Random(seed).nextInt(project.indexCompatVersions.size())]
upgradeFromVersion = '2.4.5.4'
upgradeFromVersion = '5.5.0.0-SNAPSHOT'
}

DISTRIBUTION_ARCHIVES.each {
// Adds a dependency for the current version
project.dependencies.add(BATS, project.dependencies.project(path: ":distribution:${it}", configuration: 'archives'))
}


/*
UPGRADE_FROM_ARCHIVES.each {
// The version of elasticsearch that we upgrade *from*
// project.dependencies.add(BATS, "com.strapdata.elasticsearch.distribution.${it}:elasticsearch:${upgradeFromVersion}@${it}")
project.dependencies.add(BATS, "com.strapdata.elasticsearch.distribution.${it}:elassandra:${upgradeFromVersion}@${it}")
}
//*/
*/


project.extensions.esvagrant.testSeed = seed
project.extensions.esvagrant.formattedTestSeed = formattedSeed
Expand Down Expand Up @@ -232,6 +234,12 @@ class VagrantTestPlugin implements Plugin<Project> {
contents project.version
}

Task createFullElassVersionFile = project.tasks.create('createFullElassVersionFile', FileContentsTask) {
dependsOn createBatsDirsTask
file "${batsDir}/archives/full_elass_version"
contents project.fullElassVersion
}

Task createUpgradeFromFile = project.tasks.create('createUpgradeFromFile', FileContentsTask) {
dependsOn createBatsDirsTask
file "${batsDir}/archives/upgrade_from_version"
Expand All @@ -240,7 +248,7 @@ class VagrantTestPlugin implements Plugin<Project> {

Task vagrantSetUpTask = project.tasks.create('setupBats')
vagrantSetUpTask.dependsOn 'vagrantCheckVersion'
vagrantSetUpTask.dependsOn copyBatsTests, copyBatsUtils, copyBatsArchives, createVersionFile, createUpgradeFromFile
vagrantSetUpTask.dependsOn copyBatsTests, copyBatsUtils, copyBatsArchives, createVersionFile, createFullElassVersionFile, createUpgradeFromFile
}

private static void createCheckVagrantVersionTask(Project project) {
Expand Down
1 change: 1 addition & 0 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
elasticsearch = 5.5.0
lucene = 6.6.0
elassandra = 2

# optional dependencies
spatial4j = 0.6
Expand Down
7 changes: 3 additions & 4 deletions distribution/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ configure(distributions.findAll { ['zip', 'tar', 'integ-test-zip'].contains(it.n
dirMode 0755
}
project.ext.archivesFiles = copySpec {
into("elassandra-${version}") {
into("elassandra-${project.fullElassVersion}") {
with libFiles
into('conf') {
dirMode 0750
Expand Down Expand Up @@ -438,9 +438,8 @@ configure(distributions.findAll { ['deb', 'rpm'].contains(it.name) }) {
}
else if (project.name == "deb") {
commandLine "python2", "setup.py", "install", "--no-compile",
"--root", "${packagingFiles}"
// require python-distutils, but does not work on centos...
// ,"--install-layout", "deb"
"--root", "${packagingFiles}",
"--install-lib", "/usr/lib/python2.7/dist-packages"
outputs.dir "${packagingFiles}/usr/lib/python2.7/dist-packages"
}
}
Expand Down
10 changes: 5 additions & 5 deletions distribution/deb/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@

task buildDeb(type: Deb) {
dependsOn preparePackagingFiles
baseName 'elasticsearch' // this is what pom generation uses for artifactId
baseName 'elassandra' // this is what pom generation uses for artifactId
// Follow elasticsearch's deb file naming convention
archiveName "${packageName}_${project.version}.deb"
version = project.version
archiveName "${packageName}-${project.fullElassVersion}.deb"
version = project.fullElassVersion

packageGroup 'web'
requires 'libc6'
requires 'adduser'

into('/usr/share/lintian/overrides') {
from("${project.packagingFiles}/lintian/elasticsearch")
from("${project.packagingFiles}/lintian/elassandra")
}
into('/usr/share/doc/elasticsearch') {
into('/usr/share/doc/cassandra') {
from "${project.packagingFiles}/copyright"
fileMode 0644
}
Expand Down
5 changes: 4 additions & 1 deletion distribution/deb/src/main/packaging/copyright
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Copyright 2013-2016 Elasticsearch <info@elastic.co>
Copyright 2017 Strapdata

This product includes software developed by The Apache Software Foundation (http://www.apache.org/).
This product includes software developed by Elasticsearch (http://www.elastic.co/).

License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
Loading

0 comments on commit dee357d

Please sign in to comment.