Git: Create a basic CI delivery pipeline
Create a CI delivery pipeline via Git. Make sure you have your personal Git token and the secret for the Docker Registry before you start.
Before you begin
Download and commit CI delivery pipeline resource files
The basic CI delivery pipeline comprises resource files that you must download and then commit to the Git repository. For the purposes of the quick start, you will commit them to the Git repo you selected or created during runtime installation.
- Download the following resource files:
- Github-ci EventSource (
event-source.git-ci-source.yaml
). Download - Express-ci Sensor (
sensor.express-ci.yaml
). Download - ci-simple WorkflowTemplate (
workflow-template.ci-simple.yaml
). Download
- Github-ci EventSource (
- Save and commit to the
resource_<runtime-name>
folder in the<runtime-name>_git.source
repo reated during runtime installation.
Codefresh syncs these resource definitions to your cluster, and create the resources in the cluster. - In the Codefresh UI, view the newly created pipeline in Delivery Pipelines.
Configure delivery pipeline with demo microservice application
- Update the event source to listen to events from the forked repository.
- Open
eventSource.git-ci-source.yaml
. - In line 22, update
names
andowner
forrepositories
:
Fornames
, verify thatexpress-microservice
, the name of the forked demo service is displayed.
Forowner
, add your GitHub username.
... repositories: - names: - express-microservice owner: <github-user-name> ...
- Open
- Commit the file.
- Confirm the file has been updated:
- In the Codefresh UI, go to Delivery Pipelines.
- Select the Manifests tab, and then select the
eventsource
resource. It may take a few seconds to update. - Verify that you see your changes.
- From the toolbar, open the Notifications panel to see syncs for event start and completion.
Trigger an event for the CI delivery pipeline
To complete the CI delivery pipeline, trigger an event that runs the pipeline.
- Update the
readme.md
file in the root of the Git repo and commit the changes. - Now navigate to the simple-ci pipeline and see that new workflow has been created.
- Click on the workflow to view its execution details.
This pipeline:- Clones the
express-microserivce
repo - Builds the image
- Pushes the image to your Docker Hub
- Updates Codefresh with the image information
- Clones the
- In the Codefresh UI, go to Images.