JetBrains Space Help

Get Started with Automation

All you need to start your work with Automation is simply create a .space.kts file in the project root and put at least one job into it.

To set up Automation for a project

  1. Open or create the project you want to automate.

  2. Add the .space.kts file to the project repository:

    1. On the project side-bar menu, choose Jobs.

    2. Click Create .space.kts. The file will be automatically added to the project root directory.

    By default, the created .space.kts file already contains the 'Hello world' automation script:

    job("Hello world") { container(displayName = "Say hello", image = "hello-world") }
    All this script does is run a Docker container with the 'hello-world' image.

  3. By default, a job is triggered by any commit that is pushed to the project repository. As Space added the file to the project through the 'git push', this triggered our "Hello world" job. Let's take a look at script run results:

    1. On the project side bar menu, choose Jobs.

    2. In the list of jobs, choose Hello world.

  4. Examine the job run results.

What's next. Learn the basics of Automation

Learn the Automation basics. We recommend that you start with these topics:

What's next. Use IntelliJ IDEA for writing Automation scripts

One of the ways to edit your Automation scripts is to use the code editor built in Space. It might be not convenient, especially when editing large scripts with complex logic. For such cases, we recommend that you use IntelliJ IDEA or Android Studio. These IDEs come bundled with the Space plugin: among many features the plugin provides support for Automation scripts:

Last modified: 15 December 2023