Skip to content
Romans Malinovskis edited this page Dec 2, 2019 · 5 revisions

Agile Toolkit infrastructure is awesome (I set up infrastructures like those for major UK companies for my day job at https://and.digital, more info on https://nearly.guru/devops)

Just commit and the magic will happen!

Infrastructure as a code

All infrastructure for Agile Toolkit is coded. Some of it is managed by terraform, some other things are implemented through Github Actions / Workflows. It's simple enough for anyone to modify and any change can be requested through PR.

Contributors, Maintainers and Owners

Contributor can be anyone who has created several PRs into ATK repositories. Once they are added into Contributor group, they'll be able to review+merge other people PRs for add-ons and push new feature branches into core repositories.

Maintainers are active members of community who have permission to review+merge PR in core repositories.

Owners have admin ability in core repositories as well as access to some protected repositories (project related to agile toolkit, like Saasty).

Edit here: https://github.com/atk4/infrastructure/blob/master/root/agiletoolkit.org/github.tf#L11

Adding new ATK add-on

Simply PR into this file: https://github.com/atk4/infrastructure/blob/master/root/agiletoolkit.org/addon-repos.tf#L157.

If repository already exist, process is slightly more complex and would import setup of TF/Github tokens (script is here: https://github.com/atk4/infrastructure/blob/master/root/import-addon.sh)

ATK build image

All builds are using Docker image provisioned here: https://github.com/atk4/image. To add new PHP version support, create new sub-folder and run "make" (which will create Dockerfile inside your folder). If you are modifying Dockerfile you should also run make to update respective Dockerfile's in subfolders.

After pushing into master, builds should start here: https://hub.docker.com/repository/docker/atk4/image/builds. If new version tag should be supported for PHP, add automated build config by linking respective 7.x/Dockerfile with a tag.

Once new image tag is built, you can start using it through workflow matrix: (https://github.com/atk4/data/pull/492/files#diff-4794c8638bc5e5ec555e780ee618f61fR19)

Setting up Unit Tests

Using files here as a reference: https://github.com/atk4/data/tree/develop/.github/workflows - copy them into your repository.

unit-test.yml shows a great example how to use MySQL / PostgreSQL and multi-version build. If any extra binaries are required (e.g. lessc), they should be baked into "atk4/image" to speed up builds.

CodeCov.io must be enabled manually for each repository, if you wish to track code coverage and added as a project secret.

Release drafter

We rely on 3rd party release drafter app to convert PRs into release notes. Template for the release file is here: https://github.com/atk4/dsql/blob/develop/.github/release-drafter.yml. Huge thanks to https://github.com/release-drafter/release-drafter!

Release drafter action will execute on PR merge (into develop).

Drafting new release

To start new release create branch (from develop) called "release/1.2.3". This can be done through Github interface easily. This will trigger "Bundler" action, which will automatically updated dependencies for the project and create release PR with further instructions.

Starting from version 2.0 we're squishing all PRs, therefore "master" branch will have one commit per release, while develop branch will have one commit per PR.

Setting up new repositories

Copy .github folder form existing project (e.g. atk4/dsql) into the new project and test.

Clone this wiki locally