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
- Build the API solution.
- Run all unit tests.
- Build the Functional Tests project.
- Package the API and Functional Tests Project.
- Check that deployment is happening from the main branch.
- 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).
- Run the functional tests on the staging slot of the App Service.
- Swap the staging slot with the Production slot.
See the sample YAML files here.
There are 2 YAML files in the above location
- cd-feature-flights-management.yml - The main YAML file.
- 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.