Change CI Tooling

You can change the CICD configuration of your project from within the Desktop menu. + To begin the process, click on the CICD pill at the top of the project, (detected by the application.) This will launch the automation to change CI tooling.

Click the CICD Pill

  • A modal will pop-up, asking for confirmation. There are risks associated with changing CI tooling, and those risks need to be accepted to proceed.

Select CI Tooling

  • After confirmation, you will be given another window to select a different CI tool. We recommend Gitlab. Be advised that if the proper configurations for the chosen CI solution haven't been set up, you will receive another warning message here. Be sure to choose a CI solution that has been correctly configured, or your DevOps pipelines will fail.

Edit CICD Selecion 1

  • Next, enter your Amplify DX token. This is an alphanumeric string given to you every time you login to the application. If you don't remember yours, you can log out and log back in to get a fresh token, or enter the "adx login" command on the command line. After that, enter your associated login credentials to Gitlab, and if you would like orphaned branches to be wiped from the repository after a successful merge.

Edit CICD Selecion 2

  • Next, define your code promotion path to inform the CI systems where to put your code. All dropdown menus in this form integrate with your Project Orgs, so if you don't see the orgs you expect, make certain they are available to your Project and Team.

Edit CICD Selecion 3

  • After a brief wait, the Desktop App detects the changes to the CI and the Project pipelines update without the complexities of the command line. If you were to access the Gitlab repository at this point, you would see all CI environment variables that have been updated to drive the automation.

CI Change Confirmation

This is the same process to configure CI for both project types–package or org development models, and both in-flight and net new projects. The only difference with net new projects is the Desktop App will detect no CI configuration and mark that with a "Setup CICD" pill. Click the pill and the same process will begin again.

If you have selected a CI system other than Gitlab CI and want to integrate it with your current Amplify DX project, please follow the below steps:

Environment Variables

Create the following environment/secret variables for your project on the CI server.

  1. Everything in the .env file.

    Info

    The .env file is created in your project's root directory at the time of setting up a new Amplify DX project.

  2. GIT_USERNAME: Username for your git repository.

  3. GIT_TOKEN: Access token for your git repository.
  4. CMC_REFRESH_TOKEN: Your CMC refresh token, if CMC is enabled for your project. Follow these steps to generate and store CMC refresh token.
  5. SONAR_LOGIN: Your SonarQube access token, if Sonarqube scans are enabled for your project. Follow these steps to generate and store SonarQube access token.

Amplify DX Config file

Update the config/appirio.json file in your project to include below values. Refer to this page for details.

  1. continuousIntegrationType: Service name of the CI system as per the following list.

    CI System Service Name
    Azure DevOps vsts
    Bitbucket Pipelines bitbucket
    CircleCI circleci
    Gitlab CI gitlab
    Jenkins jenkins
  2. continuousIntegrationURL: URL of the CI system.