Scala: Hello World

So, you’ve decided to try Codefresh? Welcome on board!

We’ll help you get up to speed with basic functionality such as: compiling, building Docker images and launching.

This project uses Scala to build an application which will eventually become a distributable Docker image.

Looking around

In the root of this repository you’ll find a file named codefresh.yml, this is our build descriptor and it describes the different steps that comprise our process. Let’s quickly review the contents of this file:

codefresh.yml

version: '1.0'
steps:
  generate_dockerfile:
    image: noamt/pre-cached-sbt
    working_directory: ${{main_clone}}
    commands:
      - sbt -mem 4096 clean compile package
      - sbt docker:stage

  build_step:
    type: build
    image_name: codefresh/example-scala
    working_directory: ${{main_clone}}/service/target/docker/stage
    dockerfile: Dockerfile
    tag: ${{CF_BRANCH}}

  launch_composition:
    title: Launch Composition
    type: launch-composition
    composition: docker-compose.yml
    environment_name: 'scala-example'
    entry_point: scala
Example

Just head over to the example repository in Github and follow the instructions there.

codefresh scala example