Skip to content
Permalink
Browse files
Merge pull request #1 from upthewaterspout/feature/travis
Full travis support.
  • Loading branch information
upthewaterspout committed Nov 15, 2018
2 parents 4133c35 + d9da1db commit ecaea01b90d85425516bf8e0fe128e43b30d6fe6
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 21 deletions.
@@ -1,8 +1,13 @@
required: sudo

language: java

services:
- docker

jdk:
- openjdk8

#Added to cache gradle dependencies, from the travis java manual
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
@@ -11,3 +16,15 @@ cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

script:
- ./gradlew buildTestingImage
- docker run -p 2222:22 -d --name geode-test geode-performance-testing
- ssh-keygen -N "" -f ./id_rsa
- docker cp id_rsa geode-test:/root/.ssh/id_rsa
- docker exec -it geode-test chown root:root /root/.ssh/id_rsa
- docker cp id_rsa.pub geode-test:/root/.ssh/id_rsa.pub
- docker exec -it geode-test chown root:root /root/.ssh/id_rsa.pub
- docker cp id_rsa.pub geode-test:/root/.ssh/authorized_keys
- docker exec -it geode-test chown root:root /root/.ssh/authorized_keys
- ssh -o "StrictHostKeyChecking=no" -i id_rsa -p 2222 root@localhost "pushd /geode-performance; ./gradlew geode-benchmarks:test"
@@ -14,22 +14,43 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'com.bmuschko:gradle-docker-plugin:4.0.4'
}
}


plugins {
id "org.nosphere.apache.rat" version "0.3.1"
}

apply plugin: 'com.bmuschko.docker-remote-api'

rat {
excludes = [
'.idea/**',
'.travis.yml',
'.gradle/**',
'gradlew*',
'gradle/*',
'gradle/**',
'.git/**',
'**/output/**',
'**/build/**',
'**/out/**',
'README.md'
]
}
}

// Import task types
import com.bmuschko.gradle.docker.tasks.image.*

// Use task types
task buildTestingImage(type: DockerBuildImage) {
inputDir = file(project.rootDir)
dockerFile = file('images/geode-performance/Dockerfile')
tag = 'geode-performance-testing:latest'
}
@@ -1,22 +1,5 @@
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
@@ -0,0 +1,33 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM ubuntu
# This should be built from the top level of the repository.
# docker build -t geode-performance-testing-image -f images/geode-performance/Dockerfile
RUN apt update -y && \
apt install -y openjdk-8-jdk-headless openssh-server
COPY . /geode-performance
RUN mkdir /var/run/sshd && \
sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config && \
sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd && \
ssh-keygen -N "" -f /root/.ssh/id_rsa && \
echo "Host localhost" > /root/.ssh/config && \
echo " StrictHostKeyChecking no" >> /root/.ssh/config && \
chmod 600 /root/.ssh/config && \
cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys && \
chmod 600 /root/.ssh/authorized_keys && \
rm -f /geode-performance/Dockerfile
CMD ["/usr/sbin/sshd", "-D", "-E", "/var/log/sshd.log"]
EXPOSE 22

0 comments on commit ecaea01

Please sign in to comment.