Repository

Webhooks settings

Qaack automatically manages webhooks from code platforms. A incoming webhook triggers a syncronization of the git references and if a code change is detected, then rebuilds the environment associated if its not disabled.

The webhooks and be adjusted on the Qaack side, making possible to disable and enable per git reference type (branch, tag or merge/pull request) and its also possible to filter and exclude branch names, supporting wildcards.

Trigger logic

When a webhook arrives, the steps that follows are:

  • The payload is processed to extract the git references to update

  • The git refs pass the exclusion & inclusion filters

  • When its a branch or tag:

    • The environment is rebuilt if already is created/built

  • When its a MR/PR:

    • The environment is rebuilt or created if it does not exists

Important

In case of a conflict with exclude and include options, include will have higher priority.


SSH keys

Each repository has a unique owned SSH pair key of 4096 bits.

Its automatically generated when creating repository time.

The key pair is injected into all services at path /root/.ssh/id_rsa and /root/.ssh/id_rsa.pub when they are created.

You can get the public key through repository settings endpoint, private key is not accessible with API.

Also it add SSH config file to /root/.ssh/config file, with this content:

StrictHostKeyChecking no

Scheduled rebuilds

Its possible to schedule when to rebuild the environments.

This is useful when you want to update a reusable every night, or you simply want to rebuild the environments to get the latest dependencies or external content.

This feature is configured on the repository settings and has this modes of operations:

  • Disabled: it just simply does not work

  • Reusables: Qaack will rebuild the environment that has a reusable environment saved

  • All: all the created/built environments will be recreated


Qaackfile mode

There are two places where the Qaackfile 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.