Skip to content

Commit

Permalink
Merge branch 'master' of github.com:travis-ci/travis-worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Fuchs committed Mar 2, 2012
2 parents b0b1e51 + 564c272 commit e51ecde
Showing 1 changed file with 56 additions and 4 deletions.
60 changes: 56 additions & 4 deletions lib/travis/worker/cli/development.rb
Expand Up @@ -94,7 +94,32 @@ def build_clojure
}
}

publish(payload, "builds.common", self.options[:n].to_i)
publish(payload, "builds.jvmotp", self.options[:n].to_i)
end


desc "build_with_missing_repo", "Publish a sample Clojure build job that tries to clone a repo that does not exist"
method_option :slug, :default => "michaelklishin/urly8277"
method_option :commit, :default => "d487ca890f6e7c358274a32f722506bd5568fdfc"
method_option :branch, :default => "master"
method_option :n, :default => 1
def build_with_missing_repo
payload = {
:repository => {
:slug => self.options[:slug]
},
:build => {
:id => 1,
:commit => self.options[:commit],
:branch => self.options[:branch]
},
:config => {
:language => "clojure",
:script => "lein javac, test"
}
}

publish(payload, "builds.jvmotp", self.options[:n].to_i)
end


Expand All @@ -118,7 +143,7 @@ def build_groovy
}
}

publish(payload, "builds.common", self.options[:n].to_i)
publish(payload, "builds.jvmotp", self.options[:n].to_i)
end


Expand All @@ -142,7 +167,7 @@ def build_java_with_maven
}
}

publish(payload, "builds.common", self.options[:n].to_i)
publish(payload, "builds.jvmotp", self.options[:n].to_i)
end


Expand All @@ -168,7 +193,7 @@ def build_java_with_ant
}
}

publish(payload, "builds.common", self.options[:n].to_i)
publish(payload, "builds.jvmotp", self.options[:n].to_i)
end


Expand Down Expand Up @@ -198,6 +223,33 @@ def build_node
end


desc "build_python", "Publish a sample Python build job"
method_option :slug, :default => "dstufft/slumber"
method_option :commit, :default => "8fb2a1a9c100e90c4586e8ca31d2122bfef2cfe8"
method_option :branch, :default => "master"
method_option :n, :default => 1
def build_python
payload = {
:repository => {
:slug => self.options[:slug]
},
:build => {
:id => 1,
:commit => self.options[:commit],
:branch => self.options[:branch]
},
:config => {
:language => "python",
:python => "2.7",
:script => "python setup.py test",
:install => "pip install -r requirements.txt && pip install -r requirements-test.txt"
}
}

publish(payload, "builds.php", self.options[:n].to_i)
end



protected

Expand Down

0 comments on commit e51ecde

Please sign in to comment.