Skip to content

Commit

Permalink
Merge pull request #29 from NHSDigital/feature/ERSSUP-53771-environme…
Browse files Browse the repository at this point in the history
…nt-mapping

PR pipeline for e-RS environments
  • Loading branch information
nhsd-jonathan-heather authored Jun 9, 2021
2 parents 7d4c8e4 + dc88f65 commit e2c2718
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 22 deletions.
25 changes: 25 additions & 0 deletions azure/azure-pr-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,30 @@ extends:
apigee_deployments:
- environment: internal-dev
make_spec_visible: true
service_name: ${{ variables.service_name }}-fix
short_service_name: ${{ variables.short_service_name }}-fix
product_display_name: ${{ variables.product_display_name }} (ERSFIX)
service_base_path: ${{ variables.service_base_path }}-fix
stage_name: ers_fix_pr
jinja_templates:
ERS_TARGET_SERVER: e-referrals-service-api--fix
- environment: internal-dev
make_spec_visible: true
service_name: ${{ variables.service_name }}-alpha
short_service_name: ${{ variables.short_service_name }}-alpha
product_display_name: ${{ variables.product_display_name }} (ERSALPHA)
service_base_path: ${{ variables.service_base_path }}-alpha
stage_name: ers_alpha_pr
jinja_templates:
ERS_TARGET_SERVER: e-referrals-service-api--alpha
- environment: internal-dev
make_spec_visible: true
service_name: ${{ variables.service_name }}-rc
short_service_name: ${{ variables.short_service_name }}-rc
product_display_name: ${{ variables.product_display_name }} (ERSRC)
service_base_path: ${{ variables.service_base_path }}-rc
stage_name: ers_rc_pr
jinja_templates:
ERS_TARGET_SERVER: e-referrals-service-api--rc
- environment: internal-dev-sandbox
proxy_path: sandbox
28 changes: 6 additions & 22 deletions proxies/live/apiproxy/targets/ers-target.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@
</FaultRules>
<PreFlow>
<Request>
<Step>
<!-- This will return 404 because /_status doesn't exist for the backend. Either implement _status for your backend
or use a service-callout to call health-check endpoint -->
<Name>VerifyApiKey.XApiKey</Name>
<Condition>(proxy.pathsuffix MatchesPath "/_status") and (request.verb = "GET")</Condition>
</Step>
<Step>
<Name>AssignMessage.RenameQuotaVarsFromVerifyAPIKeyPolicyClientId</Name>
</Step>
<Step>
<Name>Quota</Name>
</Step>
Expand All @@ -29,20 +20,13 @@
</Step>
</Request>
</PreFlow>
<!--
To point to a named target server as this is how it SHOULD be implemented:
For example:
<HTTPTargetConnection>
<SSLInfo>
<Enabled>true</Enabled>
</SSLInfo>
<LoadBalancer>
<Server name="e-referrals-service-api-target" />
</LoadBalancer>
</HTTPTargetConnection>
-->
<HTTPTargetConnection>
<URL>http://mocktarget.apigee.net</URL>
<SSLInfo>
<Enabled>true</Enabled>
</SSLInfo>
<LoadBalancer>
<Server name="{{ ERS_TARGET_SERVER | default('e-referrals-service-api') }}"/>
</LoadBalancer>
<Properties>
<Property name="supports.http10">true</Property>
<Property name="request.retain.headers">User-Agent,Referer,Accept-Language</Property>
Expand Down

0 comments on commit e2c2718

Please sign in to comment.