Skip to content

CI CD using Jenkins

Heina Chang edited this page Mar 1, 2019 · 1 revision

Overview

Jazz Framework uses Jenkins as the CI/CD platform to deploy Jazz Services. Login into Jenkins Server using the credentials you provided during setup.

Create Service

When user creates a new service, Jenkins create-service job is triggered for service bootstrapping process. This job will:

  1. Checkout the corresponding {service_type}-template-{runtime} from Jazz (For example, if user creates an API using nodejs runtime, jenkins job will checkout api-template-nodejs from the template repository
  2. Create a new code repository (Git) for the service
  3. Push the template into the new repository
  4. Create a web-hook for the repository to trigger builds automatically when changes are made to the new repository (to enable CI/CD!)

Deploy Service

Any change to user's code repository will automatically trigger new jenkins job that builds, tests & deploys to a specific environment (Jazz creates end-to-end environments automatically). build-pack-{service_type} is the jenkins job that is responsible for building and deploying the code (For example, build-pack-api is triggered to build and deploy code changes to services of type API. This job will:

  1. Checkout the code from code repository
  2. Build the service (based on Java, NodeJS, Python build scripts)
  3. Deploy the code to corresponding environment. For master branches, code gets deployed to production environment and for non-master branches (feature, hotfix etc.) code gets deployed to a dedicated development environment (that Jazz creates automatically during branch creation)
  4. Email notification is sent to the service owner with status of the build/deployment. On successful deployment, email contains service endpoint details that are ready to use

Delete Service

With a click of a button, Jazz takes care of deleting and cleaning up of the artifacts that it created. It keeps track of every asset for a service in asset catalog. A dedicated Jenkins job is responsible for deleting service of all service types. As part of the delete workflow, the job will:

  1. Remove the service from all environments, all the assets (API endpoints, functions, roles, S3 buckets etc.) will be deleted as part of the workflow.
  2. Delete the repository
  3. Remove the service from the Jazz service catalog