math-dojo / user-account-service

Microservice for managing the users of the math-dojo platform
1 stars 0 forks source link

Deploy PR Azure Functions into their Target Environment #39

Open noce2 opened 4 years ago

noce2 commented 4 years ago

The environment of an Azure Function is currently dictated by the combination of variables set in a yaml file environment and the secrets variable group. At the moment all PRs are by default set to non-production. The scope of this story is to enable the capability to set the environment of a PR to the master branch to the pre-production values. This will give an early indication of whether the pre-prod environment will be stable with the new code, prior to making any merges to master. Code segment: https://github.com/math-dojo/user-account-service/blob/8184e95b2ccde8216742418659ea5cdb61dd8fbb/azure-pipelines.yml#L28

The current integration tests also run against a non-prod configured version of the API exposed via the gateway. The scope of this story is to create a new pre-prod test api that contains the right request signing config for the pre-prod environment. Code segment: https://github.com/math-dojo/user-account-service/blob/8184e95b2ccde8216742418659ea5cdb61dd8fbb/azure-pipelines.yml#L131

A/C:

  1. The azure pipelines yaml is modified to use the pre-production secrets and environments if the PR target branch is master.

  2. The integration tests against a pre-prod deployed function run via a new API created on the api gateway.