Skip to content

Commit 5cc17d0

Browse files
authored
Merge pull request #1 from taoyong-ty/main
Add the initial set of starter templates
2 parents 520406f + 2c3368c commit 5cc17d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+8403
-5
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Validate Templates
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
validate-templates:
7+
permissions:
8+
contents: read
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v4
13+
with:
14+
node-version: 22
15+
- run: npm ci
16+
- run: npm run test
17+
- uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.13'
20+
- run: pip install -U cfn-lint
21+
- run: cfn-lint templates/cloudformation/* --non-zero-exit-code warning

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/node_modules
2+
/build
3+
/dist
4+
/coverage
5+
/generated-metadata

.npmignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/node_modules
2+
/build
3+
/dist
4+
/coverage

README.md

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,57 @@
1-
## My Project
1+
# CodePipeline Starter Templates
22

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.
44

5-
Be sure to:
5+
## Repository Structure
66

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.
955

1056
## Security
1157

assets/icons/appconfig.svg

Lines changed: 10 additions & 0 deletions
Loading

assets/icons/cloudformation.svg

Lines changed: 10 additions & 0 deletions
Loading

assets/icons/codepipeline.svg

Lines changed: 10 additions & 0 deletions
Loading

assets/icons/ec2.svg

Lines changed: 10 additions & 0 deletions
Loading

assets/icons/ecr.svg

Lines changed: 10 additions & 0 deletions
Loading

assets/icons/ecs.svg

Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)