External CI Jobs
The External CI Jobs feature lets you integrate External CI Tools with Copado in order to add CI Jobs as deployment steps in the Copado deployments.
Jenkins is the first supported CI Tool and more will be available in upcoming releases.
The External CI Jobs can be added in the following locations:
- New deployment step type called "External CI". This step type lets you select a pre-configured CI Job from a lookup field. Copado will request the execution and wait for its completion, the step will fail or succeed accordingly.
- New External CI Jobs related list in the Environment layout. Copado will insert the External CI Job(s) of an Environment as deployment step(s) in every Promotion deployment record where the Environment is the destination of the deployment. This is useful to enforce regression tests every time a something is deployed to a particular environment.
- User Story:
- New External CI Jobs related list in the User Story layout. Copado will insert the External CI Job(s) of a User Story as deployment step(s) in every Promotion deployment record whenever the user story is being promoted.
- Create an External CI Setting:
- Got to External CI Settings tab and click on the new button.
- Select a CI Tool from the picklist.
- Add the CI Tool Endpoint.
- Add the username, password and API token of your CI Tool account.
- Click Save.
- Validate Connection by clicking "Validate Connection".
- Create an External CI Job:
- In the External CI Setting page, click the "Related" tab.
- Click "New External CI Job".
- Select an Invoke moment (before or after deployment).
- Add a timeout in minutes.
- If the deployment should continue in case the job fails, check "Continue on Failure".
- Jobs fail either because of a timeout or because the returned status of the job is "Failed".
- Optionally select an Environment and/or a User Story where this CI Job should be included.
- Click "Lookup Job" and select one of the jobs from the popup window.
- The list of jobs is retrieved from the CI Tool.
- You may click "Refresh Cache" to update the Job List.
- When selected, the job URL will be copied to the "Job URL" Field.
- If the selected job requires parameters to perform and build, than add those parameters by clicking the "Add Build Parameter" button.
- Click Save Button.
- Add the External CI Job in an Environment, User Story or directly in a Deployment Step of type "External CI".
Building Jobs Manually
- On the Job to build, Click "Build Job" button from detail page layout.
2. Once the build request is sent you'll a message will be shown at the top of the page.
- Sample Success Message:
- Sample Error Message:
External CI Job in Deployment
- In case an external CI Job has a link to a User Story or an Environment, the Job will run automatically during the deployment. For instance, if a job is associated with an environment that job will be added as a deployment step when a deployment record is created for that environment.
- Steps order it's defined automatically considering the job's setting ("Invoke on" field). At this point, you can remove or re-order the External Job step from the Deployment.
- Once the External CI Job is completed, You'll be able to see the results by clicking on the flag icon.
- Using Copado and External CI tools mutually from a single environment, will allow you to be in charge for each and every step of your deployment process.
- Every build result of an external CI job will be logged in Copado.
- You can reach those result from a related list of it on External CI Job, Environment and User Story objects.
- With the results, you can keep track of a Job Build History. You will be able to monitor the status and duration of it.
- When clicking on "View in Jenkins"(View in [External CI Tool]) link you can open build result directly in the tool you use.