sbt-dcos

DC/OS command line wrapper

License

License

Categories

Categories

JOnAS Container Application Servers
GroupId

GroupId

io.github.jonas
ArtifactId

ArtifactId

sbt-dcos
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

sbt-dcos
DC/OS command line wrapper
Project URL

Project URL

https://github.com/jonas/sbt-dcos
Project Organization

Project Organization

io.github.jonas
Source Code Management

Source Code Management

https://github.com/jonas/sbt-dcos

Download sbt-dcos

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.jonas/sbt-dcos/ -->
<dependency>
    <groupId>io.github.jonas</groupId>
    <artifactId>sbt-dcos</artifactId>
    <version>0.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.jonas/sbt-dcos/
implementation 'io.github.jonas:sbt-dcos:0.1.0'
// https://jarcasting.com/artifacts/io.github.jonas/sbt-dcos/
implementation ("io.github.jonas:sbt-dcos:0.1.0")
'io.github.jonas:sbt-dcos:jar:0.1.0'
<dependency org="io.github.jonas" name="sbt-dcos" rev="0.1.0">
  <artifact name="sbt-dcos" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.jonas', module='sbt-dcos', version='0.1.0')
)
libraryDependencies += "io.github.jonas" % "sbt-dcos" % "0.1.0"
[io.github.jonas/sbt-dcos "0.1.0"]

Dependencies

provided (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.10.6
org.scala-sbt : sbt jar 0.13.13

Project Modules

There are no modules declared in this project.

sbt-dcos

Travis CI Status Bintray Latest Version Badge

Provides a managed DC/OS CLI binary.

Usage

To use this library in your sbt project add the following line to project/plugins.sbt:

addSbtPlugin("io.github.jonas" % "sbt-dcos" % "0.1.2")

Then use to deploy, for example to Marathon:

val deploy = taskKey[Unit]("Deploy app")

deploy := {
  val appId = name.value
  val json = baseDirectory.value / "marathon.json"

  def marathon(args: String*) =
    Process(dcosCli.value.getAbsolutePath :: "marathon" :: args.toList)

  if (marathon("task", "list", appId).!!.contains(appId))
    marathon("app", "update", "--force", appId) #< json ! streams.value.log
  else
    marathon("app", "add") #< json ! streams.value.log
  ()
}

Releasing

To release version x.y.z run:

> sbt release -Dproject.version=x.y.z

License

sbt-dcos is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

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.

Versions

Version
0.1.0