Skip to main content

Deploy your API proxy to production

This guide explains how you can set up a GitHub repository, configure CI/CD and testing for your API proxy, and then initiate its deployment to production.

Access WPP GitHub Enterprise

Set up a repo for your API proxy

  1. Create a repository for your API proxy and clone it to your computer. Follow the WPP naming conventions to name the repository.

  2. Follow the guide and file structure in wpp--apigee--factory--master-repo to set up your repository.

Set up regression testing

tip

We are working with Postman and Newman in this section.

  1. Export the Postman collection for your API. Rename the exported file to postman_collection.json.

    Instructional image
  2. Export the environment variables for your API. Rename the exported files in the format {env}.postman_environment.json (for instance, dev.postman_environment.json).

  3. Add all the exported and correctly named files to the test directory in your repo.

Download your API proxy bundle

  • In Google Apigee, download the latest revision of your API proxy. Then, copy and paste the contents of the downloaded apiproxy to your repository.

    Instructional image

Set up a CI/CD pipeline

  1. Copy and paste wpp--apigee--factory--master-repo/.github/.workflows/CI_CD.yml to your repository.

  2. In CI_CD.yml, update the following lines:

    .github/.workflows/CI_CD.yml
    env:
    # We will share the APIGEE_USER and APIGEE_PASSWORD values before your start deploying
    # Create secrets in GitHub with these values (see https://docs.github.com/en/actions/security-guides/encrypted-secrets)
    APIGEE_USER: ${{ secrets.APIGEE_USER }}
    APIGEE_PASSWORD: '${{ secrets.APIGEE_PASSWORD }}'
    # Disregard the prod password; we will add it once your proxy is ready for production
    APIGEE_PASSWORD_PROD: '${{ secrets.APIGEE_PASSWORD_PROD }}'
    # Specify the name and URLs for your proxy
    APIGEE_PROXY_NAME: 'NAME PROXY'
    NONPROD_TOKEN_URL: https://groupm-north-america.login.apigee.com/oauth/token
    PROD_TOKEN_URL: https://groupm-north-america-wpp-prod.login.apigee.com/oauth/token

Add your OpenAPI spec

Deploy your proxy to dev

Initiate deployment to prod

Once you have completed the steps described in our guide, you should be ready to deploy your API proxy to production.

  1. Create a pull request to the main branch and briefly describe your development steps.
  2. Notify the API First team of the date when you would like your proxy to go live.
  3. Once we review and verify your pull request, we will deploy it to production based on your preferred date.