Skip to main content

Configure your CI/CD

Choose your CI/CD provider

By default, Swarmion uses Github Actions to deploy. However, we have already used GitlabCI and CircleCI to deploy Swarmion projects. This guide will focus on Github Actions.

Choose you authentication method

In order to be able to deploy resources on AWS, your CI needs authentication and permissions. There are two main ways to provide authentication:

  • create an IAM user on the target AWS account, retrieve its credentials
  • create an IAM role that can be assumed by a trusted party

We strongly recommend the second option, as it will remove the risk of losing long-lived credentials. The Swarmion CI/CD from all starters, uses this method by default.

Configure your authentication

Setup authentication

If you use Github Actions, we can recommend to follow these guidelines to setup OIDC for your pipeline.

If you are using the Swarmion generated CI, once you have created the role, retrieve its ARN and place it in a Github Actions secret named AWS_ROLE_ARN_PRODUCTION.

Restrict CD permissions

Handling permissions for your CI/CD should depend on the authentication choice. When using an IAM user, you should definitely create a custom policy with the least privileges attached to this user. However, if you use OIDC, the risk is far more mitigated, so it is safer to give it admin permissions.