|
1 |
| -## My Project |
| 1 | +# CodePipeline Starter Templates |
2 | 2 |
|
3 |
| -TODO: Fill this README out! |
| 3 | +This repository contains a collection of starter templates for AWS CodePipeline, designed to help users quickly set up and configure their CI/CD pipelines for various project types and deployment scenarios. |
4 | 4 |
|
5 |
| -Be sure to: |
| 5 | +## Repository Structure |
6 | 6 |
|
7 |
| -* Change the title in this README |
8 |
| -* Edit your repository description on GitHub |
| 7 | +- `/templates`: Contains the main components of the starter templates |
| 8 | + - `/metadata`: JSON files describing each template. These files control how templates are rendered in the CodePipeline console. For more details on the schema and usage, refer to the [metadata README](templates/metadata/README.md). |
| 9 | + - `/cloudformation`: CloudFormation templates for each pipeline configuration. |
| 10 | + - `/ui-hints`: JSON files controlling the rendering of template configuration in the CodePipeline console. These files define how the template configuration step is displayed. For more information on the schema and usage, refer to the [UI hints README](templates/ui-hints/README.md). |
| 11 | +- `assets`: Contains svg icons for the starter templates |
| 12 | + |
| 13 | + |
| 14 | +## Development |
| 15 | + |
| 16 | +This project uses Node.js for development tasks. To set up the development environment: |
| 17 | + |
| 18 | +1. Ensure you have Node.js 18 or later installed |
| 19 | +2. Run `npm install` to install dependencies |
| 20 | + |
| 21 | +### Adding new templates |
| 22 | + |
| 23 | +To add a new template, follow these steps: |
| 24 | + |
| 25 | +1. Create a new metadata file for the template in the `/templates/metadata` folder. This file should conform to the schema defined in `/templates/metadata/schema.json`. |
| 26 | +2. Add the corresponding CloudFormation template file in the `/templates/cloudformation` folder. |
| 27 | +3. The build script will automatically validate the metadata and CloudFormation template files, and generate the synthesized files for the CodePipeline Console to render. |
| 28 | + |
| 29 | +### Adding new icons |
| 30 | + |
| 31 | +You are not required to add a new icon for your template. You can use the existing `codepipeline.svg` icon located in the `assets/icons/` folder. |
| 32 | + |
| 33 | +If you want to add a new icon to this package, |
| 34 | +1. Add the SVG file to the `assets/icons/` folder in this project. |
| 35 | +2. The icon-name in the metadata should correspond to the relevant folder, for example, `icon-name: lambda` expects an icon file at `asset/icons/lambda.svg`. |
| 36 | + |
| 37 | + |
| 38 | +### Testing your changes |
| 39 | + |
| 40 | +Our [template validation workflow](.github/workflows/validate-templates.yaml) involves JSON schema validation using npm and CloudFormation linting using [cfn-lint](https://github.com/aws-cloudformation/cfn-lint). To test your changes locally: |
| 41 | + |
| 42 | +1. Ensure you have npm and cfn-lint installed on your system. |
| 43 | +2. Run the following command to validate the JSON files: |
| 44 | + ``` |
| 45 | + npm run test |
| 46 | + ``` |
| 47 | +3. Run the following command to validate the CloudFormation files: |
| 48 | + ``` |
| 49 | + cfn-lint templates/cloudformation/* |
| 50 | + ``` |
| 51 | + |
| 52 | +## Contributing |
| 53 | + |
| 54 | +We welcome contributions to this project. Please read our [Contributing Guidelines](CONTRIBUTING.md) for more information on how to add new templates or improve existing ones. |
9 | 55 |
|
10 | 56 | ## Security
|
11 | 57 |
|
|
0 commit comments