You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.9 KiB
60 lines
1.9 KiB
---
|
|
|
|
# Make sure we have everything we need to run this playbook
|
|
- import_tasks: steps/requirements.yml
|
|
|
|
# Validate the API definition against the Swagger 2.0 / OAS 3.0
|
|
- include_tasks: steps/validate_openapi.yml
|
|
when: threescale_cicd_validate_openapi|bool
|
|
|
|
# Warn the user about those deprecated features
|
|
- import_tasks: steps/variables_from_inventory.yml
|
|
|
|
# Load the API definition from the provided OpenAPI file
|
|
- import_tasks: steps/read_openapi.yml
|
|
|
|
# Discover the current state of the platform
|
|
- import_tasks: steps/discover.yml
|
|
|
|
# Create or update the service definition
|
|
- import_tasks: steps/service.yml
|
|
|
|
# Create or update the methods
|
|
- import_tasks: steps/methods.yml
|
|
|
|
# Create, update or delete the mapping rules
|
|
- import_tasks: steps/mapping_rules.yml
|
|
|
|
# Update the proxy
|
|
- import_tasks: steps/proxy.yml
|
|
|
|
# Create or update policies
|
|
- import_tasks: steps/policies.yml
|
|
|
|
# Create or update application plans
|
|
- import_tasks: steps/application_plans.yml
|
|
|
|
# Create or update the default application if smoke tests are needed
|
|
- include_tasks: steps/default_application.yml
|
|
when: 'threescale_cicd_openapi_smoketest_path is defined and threescale_cicd_application_plans is defined'
|
|
|
|
# Run smoke tests on the staging gateway
|
|
- include_tasks: steps/smoke_test.yml
|
|
vars:
|
|
threescale_cicd_smoke_test_env: staging
|
|
when: 'threescale_cicd_openapi_smoketest_path is defined and threescale_cicd_application_plans is defined'
|
|
|
|
# Promote to production
|
|
- import_tasks: steps/promote.yml
|
|
|
|
# Run smoke tests on the production gateway
|
|
- include_tasks: steps/smoke_test.yml
|
|
vars:
|
|
threescale_cicd_smoke_test_env: production
|
|
when: 'threescale_cicd_openapi_smoketest_path is defined and threescale_cicd_application_plans is defined'
|
|
|
|
# Delete the metrics that are not needed anymore
|
|
- import_tasks: steps/cleanup_metrics.yml
|
|
|
|
# Publish the OpenAPI Specifications file on the 3scale Admin Portal
|
|
- import_tasks: steps/activedoc.yml
|
|
|