How it works...

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:

  1. 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).
  2. 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
...
  1. After the container image has been pushed to the registry, you can find it in your Docker Registry:

  1. 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

  1. 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.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.128.145