Config file (.qaack/qaack.yml)

This file fully describes the build process of an environment and additionally, the configuration of the features that Qaack will run for it.

Setup

There are two places where the config file can be located, in the repository or directly in the UI panel as an input.

You can select on the panel the mode you want to use for each repository, panel, repo or both.

If you select both, the file will be taken from the repository if it exists, otherwise, it will be taken from the panel.

If you select repo, it must be located on /.qaack/qaack.yml on the git ref you want to build, that means that you can have different configurations for each branch, tag or PR/MR.

qaack-in-repo

If you select panel, you can provide the file in the form when adding a repository, or in the repo settings.

qaack-in-panel

As the extension indicates, it should be encoded in YAML format.

Aliases

aliases string : array

This defines extra domains for the environment to be public accessed.

Variables

variables string : string | dict

This defines variables. You can specify variables in two ways.

The first one:

You simply add a entry like key:value. For example:

In this way, variables visibility will be always

variables:
  test_variable: value

The second one:

You specify the value but also visibility:

value string

The value of the variable

visibility string (optional)

Available visibility are always and buildtime

variables:
  test_variable:
    value: var_value
    visibility: buildtime

Quick Actions

quick_actions dict

Each quick action has a name, which the key of the dictionary, and the following options:

command string

Command to run inside the service.

service string

Service name to run the command, if not present the default service will be used.

output “string” | “file” | “none”

Default is string

Kind of output, each one does:
  • string: the command output will be showed in the interface.

  • file: the output will be a downloadable file.

  • none: the output is discarded.

filename string

Name of the file to download. (Only applies if file output mode used).

Services

services string : dict

This indicates the service that will compose the environment.

Important

Service name can only contain letters and numbers.

Its a dictionary where the key is the name of the service and the value is a dictionary describing the service.

Each service has the following options:

image string

This is the Docker image that will run this service.

checkout boolean

If place the data of the repository into the service filesystem

start string

Start command for the service.

port integer

Port to expose

variables same as global variable config

Variables per service

Tests

tests dict

This indicates the tests that will be run for the environment.

Each test has a name, which the key of the dictionary, and the following options:

type string

Type of test, available types are screenshot and lighthouse.

Example

variables:
  var1: value1
  var2:
    value: value2

quick_actions:
  get_file:
    command: cat my_file

  reinstall_packages:
    command: npm ci
    output: none

  dump_database:
    command: "mysqldump | gzip"
    output: file
    service: mariadb
    filename: dump.sql.gz

tests:
  home-screenshot:
    type: screenshot
  lighthouse:
    type: lighthouse

services:
  web:
    image: php:7.4
    checkout: true

  db:
    image: mariadb