Scala SBT project build failure using circle.yml file

sbt
circle.yml

#1

Hi! I am trying to build Scala SBT project with circle.yml file.

Failure message:

machine:
bash: line 1: machine:: command not found

machine: returned exit code 127

Action failed: machine:

circle.yml

machine:
  java:
    version: oraclejdk8
  environment:
    SBT_VERSION: 0.13.8
    SBT_OPTS: "-Xms512M -Xmx1024M -XX:+CMSClassUnloadingEnabled"
dependencies:
  cache_directories:
    - "~/.sbt"
  pre:
    - wget --output-document=$HOME/bin/sbt-launch.jar https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/"$SBT_VERSION"/sbt-launch.jar
    - echo "java $SBT_OPTS -jar \`dirname \$0\`/sbt-launch.jar \"\$@\"" > $HOME/bin/sbt
    - chmod u+x $HOME/bin/sbt
    - which sbt
    - sbt sbt-version

I also tried with different configs, but all are failing with same failure message. Any ideas what is wrong?


#2

To be more precise, failure message comes after sbt sbt-version command which is executed successful.

Is it trying to execute command machine:? How is that possible?

Thanks in advance!


#3

It looks like it might be trying to run circle.yml as part of the test command?

I locted https://gist.github.com/andyscott/5624605 which may help.

https://github.com/jamespamplin/test-sbt-circle-ci/blob/master/circle.yml is also an example of a SBT build that passes, it looks like the test section is overrode here as well.


#4

I added test section to circle.yml file and it failed with same failure message. Then I replaced the original circle.ci with this one https://github.com/jamespamplin/test-sbt-circle-ci/blob/master/circle.yml and compilation still failed with same message.

Is it possible get exact command script from ci container?

Thanks!


#5