Integrating CircleCI

Add a CircleCI job that promotes successful builds into Jaws Deploy and starts a deployment.

Search guides... Ctrl K

CircleCI talks to Jaws Deploy through the REST API. CircleCI doesn't ship PowerShell by default, so the cleanest path is a Linux job that calls curl.

// .circleci/config.yml fragment

A `create_release` job after build and test

Store JAWS_API_KEY and JAWS_SA_ID as project environment variables.

version: 2.1
jobs:
  create_release:
    docker:
      - image: cimg/base:stable
    steps:
      - run:
          name: Create Jaws Deploy release
          command: |
            curl -X POST "https://app.jawsdeploy.net/api/workspaces/default/projects/checkout-service/releases" \
              -u "$JAWS_SA_ID:$JAWS_API_KEY" \
              -H "Content-Type: application/json" \
              -d "{
                \"version\":  \"$CIRCLE_BUILD_NUM\",
                \"packages\": { \"Checkout.Web\": \"$CIRCLE_BUILD_NUM\" }
              }"

workflows:
  build_and_release:
    jobs:
      - build
      - create_release:
          requires: [build]
          filters:
            branches:
              only: main