Summary
A summary of the content covered in the chapter.
This chapter introduced the four stages of the release pipeline and Github Actions to automate the release pipeline stages,
- Source
- Build
- Testing
- Release
Linting
We introduced linting and how you can lint your playbooks using the ansible-lint
module. We looked at the following methods to deal with errors generated by the ansible-lint
command:
- Fix the error.
- Ignore the rule using either:
-x
flag.- Adding comments to the playbook.
Lint Github action
Next, we introduced GitHub actions, the main parts, and how to create one to lint your playbooks every time you push your code.
You defined your lint action in the lint.yml
file. The actions consist of the following parts:
name
: provides a human-readable name to the action.on
: determines when the action is run by specifying triggers.jobs
: lists all the build steps within the workflow.
Docker container GitHub action
Next, we answered the question "How do you run our development container with GitHub actions?"
We created a Docker GitHub action to deploy your multi-cloud container. You used the entrypoint.sh
file to automate the scripting.
Deploy Ansible workflow
Next, you used the Docker container GitHub action, built a workflow on top of it, and we introduced GitHub secrets to populate the environment variables.
Setting a failure exit code in a Docker container
You added an if
statement in your entrypoint.sh
to accurately return the Ansible failure to troubleshoot better what went wrong.
Next, we looked into how you can reduce your workflow execution time with a base image deployed to Dockerhub.
Lastly, you combined the two lint
and deploy-ansible
workflows to avoid deploying the code if linting
fails.
Delete the environments
You can delete the infrastructure to avoid any unexpected bills.
Disclaimer: Run the playbook at your own risk!
It is highly recommended you use a development AWS account and Azure subscription before executing these playbooks.
You can review the playbooks in the sections for Deploy to Azure and Deploy to AWS to delete the infrastructure.
Get hands-on with 1200+ tech skills courses.