This repository was archived by the owner on Nov 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 90
Add new saveAppGraph sbt task
#1020
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c8b4873
Implement main methods.
Lockdain 1ee8a78
Add documentation description.
Lockdain 6c08714
Fix discussion
Lockdain 65c259e
Extend test to cover printAppGraph task.
Lockdain 055472a
Extend documentation
Lockdain d4a4d09
Update settings
Lockdain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
tools/cloudflow-sbt-plugin/src/sbt-test/sbt-cloudflow/app-graph-generation/build.sbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| lazy val helloWorld = (project in file(".")) | ||
| .enablePlugins(CloudflowApplicationPlugin, CloudflowAkkaPlugin) | ||
| .settings( | ||
| scalaVersion := "2.12.11", | ||
| name := "hello-world", | ||
| version := "0.0.1", | ||
| cloudflowDockerBaseImage := "adoptopenjdk/openjdk11:alpine", | ||
| libraryDependencies ++= Seq( | ||
| "ch.qos.logback" % "logback-classic" % "1.2.3" | ||
| ) | ||
| ) |
7 changes: 7 additions & 0 deletions
7
.../cloudflow-sbt-plugin/src/sbt-test/sbt-cloudflow/app-graph-generation/project/plugins.sbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| sys.props.get("plugin.version") match { | ||
| case Some(x) => addSbtPlugin("com.lightbend.cloudflow" % "sbt-cloudflow" % x) | ||
| case _ => sys.error("""|The system property 'plugin.version' is not defined. | ||
| |Specify this property using the scriptedLaunchOpts -D.""".stripMargin) | ||
| } | ||
|
|
||
| libraryDependencies += "com.lihaoyi" %% "ujson" % "0.9.5" |
5 changes: 5 additions & 0 deletions
5
...-plugin/src/sbt-test/sbt-cloudflow/app-graph-generation/src/main/blueprint/blueprint.conf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| blueprint { | ||
| streamlets { | ||
| hello-world = helloworld.HelloWorldShape | ||
| } | ||
| } |
34 changes: 34 additions & 0 deletions
34
...rc/sbt-test/sbt-cloudflow/app-graph-generation/src/main/scala/helloworld/HelloWorld.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| /* | ||
| * Copyright (C) 2016-2021 Lightbend Inc. <https://www.lightbend.com> | ||
| * | ||
| * Licensed 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. | ||
| */ | ||
| package helloworld | ||
|
|
||
| import akka.stream.scaladsl._ | ||
| import cloudflow.akkastream._ | ||
| import cloudflow.akkastream.scaladsl._ | ||
| import cloudflow.streamlets._ | ||
|
|
||
| class HelloWorldShape extends AkkaStreamlet { | ||
| val shape = StreamletShape.empty | ||
|
|
||
| def createLogic = new RunnableGraphStreamletLogic() { | ||
| def runnableGraph = | ||
| Source | ||
| .single("Hello, world!") | ||
| .map(println) | ||
| .to(Sink.ignore) | ||
| } | ||
| } | ||
|
|
6 changes: 6 additions & 0 deletions
6
tools/cloudflow-sbt-plugin/src/sbt-test/sbt-cloudflow/app-graph-generation/test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # save an app graph file to the default path | ||
| > saveAppGraph | ||
| $ exists target/visuals/blueprint/appGraph.txt | ||
|
|
||
| # print an app graph to the console | ||
| > printAppGraph |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.