-
Notifications
You must be signed in to change notification settings - Fork 2
CI CD using Jenkins
Jazz Framework uses Jenkins as the CI/CD platform to deploy Jazz Services. Login into Jenkins Server using the credentials you provided during setup.
When user creates a new service, Jenkins create-service job is triggered for service bootstrapping process. This job will:
- 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
- Create a new code repository (Git) for the service
- Push the template into the new repository
- Create a web-hook for the repository to trigger builds automatically when changes are made to the new repository (to enable CI/CD!)
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:
- Checkout the code from code repository
- Build the service (based on Java, NodeJS, Python build scripts)
- 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)
- 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
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:
- Remove the service from all environments, all the assets (API endpoints, functions, roles, S3 buckets etc.) will be deleted as part of the workflow.
- Delete the repository
- Remove the service from the Jazz service catalog