Importing an application as a pipeline

Most of the time, you will be required to import a local project or Git repository into Jenkins. Let's perform the following steps to create a local clone of an existing repository and import it as a pipeline:

  1. First, fork your copy of the example code to your account. Go to https://github.com/k8sdevopscookbook/python-flask-docker in your browser and click on the Fork button in the upper-right corner.
  2. Clone the repository to your local machine. Make sure that you replace your_github_username with your GitHub username where you forked the example:
$ git clone https://github.com/your_github_username/python-flask-docker.git
  1. Now, you should have a local copy of the python-flash-docker application. Use the following commands to import the project:
$ cd python-flask-docker
$ jx import
  1. Now, you can watch the pipeline activity either from the Jenkins Blue Ocean view or the CLI. The following screenshot shows the pipeline activity on the Jenkins Blue Ocean dashboard:

  1. As an alternative, you can watch the activity on the CLI using the jx get activity command:
$ jx get activity -f python-flask-docker -w
STEP STARTED AGO DURATION STATUS
muratkars/python-flask-docker/master #1 1m3s Running
Checkout Source 22s 5s Succeeded
CI Build and push snapshot 17s NotExecuted
Build Release 17s Pending
...
Promoted 2m5s 2m0s Succeeded Application is at: http://python-flask-docker.jx-staging.35.188.140.152.nip.io
Clean up 1s 0s Succeeded
..................Content has been hidden....................

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