Adding a test stage to our pipeline

We are going to use the web interface to make that change:

  1. Open https://console.aws.amazon.com/codepipeline in your browser.
  2. Select the helloworld pipeline we previously created.
  3. On the helloworld pipeline page, click on the Edit button at the top of the pipeline.
  4. We are now going to add a stage by clicking on the icon + Stage button located between the Source and Beta stages.
  5. Call that stage Test and click on Action.
  6. In the right-hand side menu, in the Action category choose the action called Test.
  7. Call your action Jenkins and for the Test provider, select Add Jenkins.
  8. In the Add Jenkins menu, leave Provider Name set to Jenkins, provide your Jenkins URL, in my case http://54.175.97.69:8080. The project name needs to match the name of the job on Jenkins, in our case HelloworldTest. Once set, click on Add action.
  9. Apply your change by clicking on Save pipeline changes at the top of the pipeline.
  10. Run the pipeline again by clicking on Release change. After a few minutes, you should be able to see the Jenkins step being executed and, if everything went well, becoming green.

Our pipeline is starting to look very interesting now. We demonstrated the Jenkins integration in its most rudimentary function, but you can easily imagine more realistic scenarios where you would add a step after deploying your code to staging to do better validation with better integration, load, and even penetration testing.

The goal of AWS CodePipeline is to help you take services from source control all the way up to production. As you first start working on a service, you might not have the test coverage needed to build the confidence needed to continuously deploy to production so you might opt for a one-click production deployment instead. We are going to take advantage of the automation we built so far in this chapter and build a CD pipeline for production.

..................Content has been hidden....................

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