Skip to content

Commit

Permalink
Use container based builds in travis. Enable caching for travis. Set …
Browse files Browse the repository at this point in the history
…travis fork count to 2.
  • Loading branch information
tillrohrmann committed Dec 18, 2014
1 parent 1cd44e0 commit f10d357
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ tmp
.DS_Store
_site
docs/api
atlassian-ide-plugin.xml
15 changes: 10 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
# s3 deployment based on http://about.travis-ci.org/blog/2012-12-18-travis-artifacts/

language: java
# send to container based infrastructure: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

cache:
directories:
- $HOME/.m2

install: true

language: java

#See https://issues.apache.org/jira/browse/FLINK-1072
matrix:
Expand Down Expand Up @@ -44,12 +52,9 @@ before_script:
- "gem install --no-document --version 0.8.9 faraday "
- "gem install --no-document travis-artifacts & "


install: true

# we have to manually set the forkCount because maven thinks that the travis
# machine has 32 cores
script: "mvn -Dflink.forkCount=4 -B $PROFILE clean install verify"
script: "mvn -Dflink.forkCount=2 -B $PROFILE clean install verify"

# deploy if the first job is successful; should be replaced by an after_all_success if travis finally supports it
after_success:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ FlinkMiniCluster(userConfiguration){
import LocalFlinkMiniCluster._

val jobClientActorSystem = AkkaUtils.createActorSystem()
var jobClient: Option[ActorRef] = None

override def generateConfiguration(userConfiguration: Configuration): Configuration = {
val config = getDefaultConfig
Expand Down Expand Up @@ -72,13 +73,18 @@ FlinkMiniCluster(userConfiguration){
}

def getJobClient(): ActorRef ={
val config = new Configuration()

config.setString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY, HOSTNAME)
config.setInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY, getJobManagerRPCPort)
jobClient match {
case Some(jc) => jc
case None =>
val config = new Configuration()

config.setString(ConfigConstants.JOB_MANAGER_IPC_ADDRESS_KEY, HOSTNAME)
config.setInteger(ConfigConstants.JOB_MANAGER_IPC_PORT_KEY, getJobManagerRPCPort)

JobClient.startActorWithConfiguration(config)(jobClientActorSystem)
val jc = JobClient.startActorWithConfiguration(config)(jobClientActorSystem)
jobClient = Some(jc)
jc
}
}

def getJobClientActorSystem: ActorSystem = jobClientActorSystem
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ under the License.
<!-- Need to use a user property here because the surefire/failsafe
forkCount is not exposed as a property. With this we can set
it on the "mvn" commandline in travis. -->
<flink.forkCount>1C</flink.forkCount>
<flink.forkCount>1.5C</flink.forkCount>
<flink.reuseForks>true</flink.reuseForks>
<slf4j.version>1.7.7</slf4j.version>
<guava.version>17.0</guava.version>
Expand Down Expand Up @@ -662,6 +662,7 @@ under the License.
<!-- Build files -->
<exclude>**/*.iml</exclude>
<exclude>flink-quickstart/**/testArtifact/goal.txt</exclude>
<exclude>atlassian-ide-plugin.xml</exclude>
<!-- Generated content -->
<exclude>**/target/**</exclude>
<exclude>docs/_site/**</exclude>
Expand Down

0 comments on commit f10d357

Please sign in to comment.