https://github.com/jonas/sbt-dcos
DC/OS command line wrapper for sbt
https://github.com/jonas/sbt-dcos
cli dcos sbt-plugin
Last synced: over 1 year ago
JSON representation
DC/OS command line wrapper for sbt
- Host: GitHub
- URL: https://github.com/jonas/sbt-dcos
- Owner: jonas
- License: apache-2.0
- Created: 2017-03-06T03:33:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-28T01:34:35.000Z (about 9 years ago)
- Last Synced: 2025-01-25T04:43:57.881Z (over 1 year ago)
- Topics: cli, dcos, sbt-plugin
- Language: Scala
- Homepage:
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# sbt-dcos
[![Travis CI Status]][Travis CI]
[![Bintray Latest Version Badge]][Bintray Latest Version]
Provides a managed [DC/OS CLI] binary.
## Usage
To use this library in your sbt project add the following line to `project/plugins.sbt`:
```sbt
addSbtPlugin("io.github.jonas" % "sbt-dcos" % "0.1.2")
```
Then use to deploy, for example to Marathon:
```sbt
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][apache] (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.
[apache]: http://www.apache.org/licenses/LICENSE-2.0
[DC/OS CLI]: https://github.com/dcos/dcos-cli
[Travis CI]: https://travis-ci.org/jonas/sbt-dcos
[Travis CI Status]: https://travis-ci.org/jonas/sbt-dcos.svg?branch=master
[Bintray Latest Version Badge]: https://api.bintray.com/packages/fonseca/maven/sbt-dcos/images/download.svg
[Bintray Latest Version]: https://bintray.com/fonseca/maven/sbt-dcos/_latestVersion