1 Setup: Pipelines
Pratik Bhattacharya редактировал(а) эту страницу 2021-12-20 00:49:16 +05:30

Pipelines

You can use Pipelines for building the deploying the Feature Flighting Management service.

Continuous Integration (CI)

To ensure that your code is building correctly you can use the GitHub actions. The GitHub action will build the API and run all Unit test cases to confirm the veracity of the code. The same CI GitHub action is used for validating a Pull Request to the main branch.

We have GitHub action for CodeQL validation of the build.

Continuous Deployment (CD)

Depending upon your infrastructure you can create your CD pipelines using any tools (like Jenkins, Azure pipelines, etc.).

Azure Pipelines

See the official documentation for creating an Azure Pipeline.

We have provided a sample YAML file that can you be used to create your customized pipeline. The pipeline performs the following tasks

  1. Build the API solution.
  2. Run all unit tests.
  3. Build the Functional Tests project.
  4. Package the API and Functional Tests Project.
  5. Check that deployment is happening from the main branch.
  6. Publish the API package to the staging slot of the App Service (the environment configurations are part of the pipeline, you can change them as per your requirement).
  7. Run the functional tests on the staging slot of the App Service.
  8. Swap the staging slot with the Production slot.

See the sample YAML files here.

There are 2 YAML files in the above location

  1. cd-feature-flights-management.yml - The main YAML file.
  2. templates/app-service-deploy.yml - A template YAML file for publishing package in the App Service

*Note 1: The YAML file has only 1 environment setup, as per your requirement you can setup the other environments as per your requirement.

*Note 2: You will need to replace the variables value in the deployment step.