Skip to content

Commit

Permalink
skipped few lines to avoid running concourse stuff during composer!
Browse files Browse the repository at this point in the history
  • Loading branch information
feroshjacob committed Oct 17, 2018
1 parent 350b366 commit 0d887c5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/main/scala/com/recipegrace/bbc/BaseTemplateMain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ abstract class BaseTemplateMain extends BBCGrammar {
}
} catch {
case x: Throwable => {
x.printStackTrace()
logger.setLevel(Level.SEVERE)
logger.info("parse error:" + x.getMessage)
errorMessage = x.getMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ class GenerateFlows(bBC: BBC) extends ClusterStoreIO with GrammarKeywords with


def findResources = {
bBC.activeRepositoryJobs(bBC.actions).groupBy(f=>f.getName).map(f=>f._2.head).toList.map(f=> GitRepository( f.repositoryJob.getRepository.get.value+"", f.repositoryJob.getBranch.get.value+"",f.repositoryJob.getName))

if( bBC.activeRepositoryJobs(bBC.actions).groupBy(f=>f.getName).map(f=>f._2.head).toList.exists(f=> f.repositoryJob.getBranch.isEmpty)) List()
else bBC.activeRepositoryJobs(bBC.actions).groupBy(f=>f.getName).map(f=>f._2.head).toList.map(f=> GitRepository( f.repositoryJob.getRepository.get.value+"", f.repositoryJob.getBranch.get.value+"",f.repositoryJob.getName))

}
def createDownloadBlock(programConfiguration: ProgramConfiguration, repository: Repository, org: Expressions.Expression,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ class RunPythonFlowBlock(pyJob: PyJob, variables:Map[String,Expression], configu
extends FlowBlock(configuration) with BaseConcoursePythonTask {


override var displayName:String = "pythonjob-"
override var displayName:String = "pythonjob"
override var toXML: NodeSeq = {

<notimplemented/>
}
override var toYAML: List[Map[String, Any]] = {
if(pyJob.pyJob.container.nonEmpty)
createBasePythonConcourseTask(autoId,displayName,pyJob,variables,clusterStore,configuration)
else List()
}
override val flowBlockId: Int = autoId

Expand All @@ -33,10 +35,7 @@ class RunPythonFlowBlock(pyJob: PyJob, variables:Map[String,Expression], configu
object evalObject extends ExpressionCreator
val id = IDGenerator.autoId
val defaultArgs = Map ( "programConfiguration"->configuration, "localVariables" -> variables,"evalObject" -> evalObject)
/* val copyJarKey = displayName +"_C"+id
val copyJarContent = Templates.translate("templates/download-jar.ssp",Map("name" -> copyJarKey,
"javaJob" -> javaJob) ++defaultArgs)
*/

val runJarKey = displayName+"_R"+id
val runJarContent = Templates.translate("templates/run-python.ssp",Map("name" -> runJarKey,
"pythonJob" -> pyJob) ++defaultArgs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class WorkflowsFromFilesTest extends BaseWorkflowTest {

test("main file test (concourse)") {

val fileName = "simplejob.bbc"
val fileName = "fakeexample.bbc"
printOutConcourseAndComposePipeLines(fileName)

}
Expand Down

0 comments on commit 0d887c5

Please sign in to comment.