Skip to content
This repository has been archived by the owner on Feb 18, 2022. It is now read-only.

Latest commit

 

History

History
35 lines (26 loc) · 1.96 KB

10_add_a_module.md

File metadata and controls

35 lines (26 loc) · 1.96 KB

Add a module

If you keep your modules in their own individual repositories, you can have CD4PE manage their deployment. Just like the control repository, they will have pipelines to validate code, run Impact Analysis, and deploy to environments. Pushing a feature branch even causes CD4PE to make a corresponding branch in the control repository and deploy it, saving you a few manual steps.

Do this

  1. Switch over to the CD4PE GUI
  2. In the left-hand navigation, select "Modules"
  3. Over on the right, click "Add Module"
  4. Choose GitLab as the source
  5. Choose the "Continuous Delivery" organization
  6. Select your numbered "puppet-mymodule-Y" repository
  7. Click "Add"
  8. It should detect the .cd4pe.yaml file, click "Yes, manage as code"
  9. Click "Done" to dismiss the dialog

Now let's make sure the Pipelines are working as advertised. In the interest of time, we'll just push a commit to the master branch. (If you have extra time, try the full workflow of creating a feature branch, pushing it, running an agent against it, creating a pull request, and then merging it.)

  1. Switch to your SSH connection on the CD4PE node
  2. Change directories into your ~/puppet-mymodule directory
  3. Make an empty commit to master and push it
    1. git commit -m 'Empty for direct push to master' --allow-empty
    2. git push origin master
  4. Switch back to the CD4PE GUI
  5. Click "New events" and watch the pipeline run through the Development deployment
  6. Click the "Promote" button, to deploy to Staging and watch it go
  7. Click the "Promote" button, to deploy to Production

Discussion questions

  • Suppose several teams have to cooperate on a single "profile" module, but they have to promote their changes at different velocities. How might breaking out profiles into team-specific modules make this manageable?

Previous - 09 Create and Merge Pull Request | Next - 11 Protect an Environment Group