The second recipe of this section, Importing an application as a pipeline, showed you how to create a Jenkins pipeline using an existing project.
In step 3, the following happens when you import the application using the jx import command:
- First, the project source is checked out from the repository and a new semantic version number is applied. Then, with the help of Skaffold, a command-line tool that facilitates continuous development for Kubernetes applications, Git tag v0.0.1 is created and unit tests are executed (in our example, there were no unit tests).
- After the unit tests have been executed, a Docker image is created and pushed to the local Container Registry. You can see this process on the following code:
Starting build...
Building [devopscookbook/python-flask-docker]...
Sending build context to Docker daemon 127kB
Step 1/8 : FR
OM python:3.6
3.6: Pulling from library/python
4ae16bd47783: Pulling fs layer
bbab4ec87ac4: Pulling fs layer
...
- After the container image has been pushed to the registry, you can find it in your Docker Registry:
- During the Promote to Environments stage, a Helm build will be executed. After the charts have been pushed to the local chartmuseum repository, you can find the Helm chart in the repository:
$ helm search python-flask-docker
NAME CHART VERSION APP VERSION DESCRIPTION
jenkins-x-chartmuseum/python-flask-docker 0.0.1 0.0.1 A Helm chart for Kubernetes
- Finally, the staging pipeline runs from the master branch and deploys our pod from the Helm repository into the jx-staging namespace. Both the staging and application pipelines will be completed after this step.