$npx -y skills add aws-samples/sample-agent-skills-for-builders --skill create-install-scriptsGenerate CI/CD installation scripts for AWS CDK projects. Use when setting up deployment pipelines, creating install.sh scripts, configuring GitLab CI, or setting up AWS CodeBuild for CDK deployments.
| 1 | # Create Install Scripts |
| 2 | |
| 3 | Generate installation scripts, GitLab CI configuration, and CodeBuild deployment setup for AWS CDK projects. |
| 4 | |
| 5 | ## When to Apply |
| 6 | |
| 7 | Reference this skill when: |
| 8 | - Setting up deployment pipelines for CDK projects |
| 9 | - Creating interactive install.sh scripts |
| 10 | - Configuring GitLab CI/CD for AWS deployments |
| 11 | - Setting up AWS CodeBuild for Docker image builds |
| 12 | - Automating CDK deployment workflows |
| 13 | |
| 14 | ## How It Works |
| 15 | |
| 16 | 1. Analyze the CDK project structure |
| 17 | 2. Generate `install.sh` for interactive local deployments |
| 18 | 3. Generate `.gitlab-ci.yml` for GitLab CI/CD |
| 19 | 4. Generate `buildspec.yml` for AWS CodeBuild |
| 20 | 5. Configure deployment variables and secrets |
| 21 | |
| 22 | ## Prerequisites |
| 23 | |
| 24 | - AWS CDK project initialized |
| 25 | - GitLab repository (for CI/CD) |
| 26 | - AWS credentials configured |
| 27 | - Docker (if using CodeBuild for images) |
| 28 | |
| 29 | ## Usage |
| 30 | |
| 31 | ```bash |
| 32 | # Run the setup script |
| 33 | ./scripts/setup-cicd.sh |
| 34 | |
| 35 | # Or trigger via agent |
| 36 | "Set up CI/CD for my CDK project" |
| 37 | "Create install scripts for deployment" |
| 38 | ``` |
| 39 | |
| 40 | ## Generated Files |
| 41 | |
| 42 | | File | Purpose | |
| 43 | |------|---------| |
| 44 | | `install.sh` | Interactive installation script | |
| 45 | | `.gitlab-ci.yml` | GitLab CI/CD pipeline | |
| 46 | | `buildspec.yml` | AWS CodeBuild specification | |
| 47 | |
| 48 | ## References |
| 49 | |
| 50 | - [Install Script Guide](./references/install-script-guide.md) - Complete install.sh creation guide |
| 51 | - [GitLab CI Setup](./references/gitlab-ci-setup.md) - GitLab CI/CD configuration |
| 52 | - [CodeBuild Setup](./references/codebuild-setup.md) - AWS CodeBuild setup |
| 53 | - [Common Pitfalls](./references/common-pitfalls.md) - Troubleshooting guide |