datarobot-oss/datarobot-agent-skills / skills/datarobot-app-framework-cicd
datarobot-app-framework-cicd
FlaggedGuidance for setting up CI/CD pipelines for DataRobot application templates using GitLab, GitHub Actions, and Pulumi for infrastructure as code. Use when setting up CI/CD pipelines, configuring deployments, or managing infrastructure for DataRobot application templates.
| File | Kind | Size |
|---|---|---|
| QUICK_REFERENCE.md | markdown | 4.0 KB |
| README.md | markdown | 6.6 KB |
| SKILL.md | skill md | 19.6 KB |
| examples/github-cd-pulumi-cloud.yml | config | 1.1 KB |
| examples/github-deploy-pulumi-cloud.yml | config | 1.3 KB |
| examples/github-destroy-pulumi-cloud.yml | config | 1.2 KB |
| examples/workflows-README.md | markdown | 3.0 KB |
| references/example-taskfile.yaml | config | 895 B |
| references/workflow-examples.md | markdown | 2.5 KB |
| scripts/decrypt-secrets.shexecutable | script | 1.2 KB |
| scripts/encrypt-secrets.shexecutable | script | 1.9 KB |
| scripts/github-cd.yml | config | 2.0 KB |
| scripts/github-deploy.yml | config | 5.0 KB |
| scripts/github-destroy.yml | config | 1.9 KB |
| scripts/gitlab-ci.yml | config | 4.7 KB |
| scripts/infra-README.md | markdown | 6.4 KB |
| scripts/pulumi-setup.shexecutable | script | 10.8 KB |
| scripts/setup-github-secrets.shexecutable | script | 3.6 KB |
| scripts/setup-gitlab-variables.shexecutable | script | 4.4 KB |
| scripts/taskfile-snippets.yaml | config | 5.6 KB |
scripts/infra-README.md
View on GitHub# Infrastructure and CI/CD Scripts
This directory contains all CI/CD and infrastructure-related scripts for the application template.
## Directory Structure
```
project-root/
├── infra/
│ ├── Taskfile.yaml # ⚠️ CI/CD tasks go HERE (copy from infra/scripts/taskfile-snippets.yaml)
│ └── scripts/ # CI/CD scripts directory
│ ├── setup-github-secrets.sh # GitHub secrets setup (gh CLI)
│ ├── setup-gitlab-variables.sh # GitLab variables setup (glab CLI)
│ ├── encrypt-secrets.sh # Encrypt root .env → .env.gpg
│ ├── decrypt-secrets.sh # Decrypt root .env.gpg → .env
│ ├── pulumi-setup.sh # Pulumi backend configuration
│ ├── gitlab-ci.yml # GitLab CI/CD template
│ ├── github-deploy.yml # GitHub Actions deploy template
│ ├── github-destroy.yml # GitHub Actions destroy template
│ ├── taskfile-snippets.yaml # Source for infra/Taskfile.yaml (do NOT paste into root Taskfile.yml)
│ └── README.md # This file
├── .env # Secrets (never commit!)
├── .env.gpg # Encrypted secrets (commit this)
├── .gitlab-ci.yml # Copied from infra/scripts/gitlab-ci.yml
├── .github/
│ └── workflows/
│ ├── deploy.yml # Copied from infra/scripts/github-deploy.yml
│ └── destroy.yml # Copied from infra/scripts/github-destroy.yml
└── Taskfile.yml # Root Taskfile — ONLY add includes entry for infra/Taskfile.yaml
```
## Scripts Overview
### Secrets Management
#### `encrypt-secrets.sh`
Encrypts `../../.env` to `../../.env.gpg` using GPG for GitHub Actions.
**Usage:**
```bash
cd infra/scripts
./encrypt-secrets.sh
# Or from root: task encrypt-secrets
```
#### `decrypt-secrets.sh`
Decrypts `../../.env.gpg` to `../../.env` for local development.
**Usage:**
```bash
cd infra/scripts
./decrypt-secrets.sh
# Or from root: task decrypt-secrets
```
#### `setup-github-secrets.sh`
Interactive setup of GitHub repository secrets using `gh` CLI.
**Usage:**
```bash
cd infra/scripts
./setup-github-secrets.sh
# Or from root: task setup-github-secrets
```
**Prerequisites:**
- GitHub CLI installed: `brew install gh`
- Authenticated: `gh auth login`
#### `setup-gitlab-variables.sh`
Interactive setup of GitLab project variables using `glab` CLI.
**Usage:**
```bash
cd infra/scripts
./setup-gitlab-variables.sh
# Or from root: task setup-gitlab-vars
```
**Prerequisites:**
- GitLab CLI installed: `brew install glab`
- Authenticated: `glab auth login`
### Infrastructure Setup
#### `pulumi-setup.sh`
Interactive Pulumi backend configuration with support for:
- Pulumi Cloud
- Azure Blob Storage
- AWS S3
- Google Cloud Storage
**Usage:**
```bash
cd infra/scripts
./pulumi-setup.sh
```
### CI/CD Configuration Templates
#### `gitlab-ci.yml`
Complete GitLab CI/CD pipeline template with:
- Automated linting and testing
- Manual review app deployments
- Continuous delivery on merge to main
- Pulumi DIY backend support
**Setup:**
```bash
cp infra/scripts/gitlab-ci.yml .gitlab-ci.yml
```
#### `github-deploy.yml`
GitHub Actions deployment workflow with:
- Automated testing and linting
- PR-based review deployments
- GPG-encrypted secrets support
- PR comments with deployment URLs
**Setup:**
```bash
mkdir -p .github/workflows
cp infra/scripts/github-deploy.yml .github/workflows/deploy.yml
```
#### `github-destroy.yml`
GitHub Actions workflow for manual stack cleanup.
**Setup:**
```bash
cp infra/scripts/github-destroy.yml .github/workflows/destroy.yml
```
### Taskfile Integration
#### `taskfile-snippets.yaml`
Contains Task definitions to copy to `infra/Taskfile.yaml`.
> ⚠️ **Do NOT paste these tasks into the root `Taskfile.yml`.** Instead:
> 1. Copy this file: `cp infra/scripts/taskfile-snippets.yaml infra/Taskfile.yaml`
> 2. Add a single `includes` entry to the root `Taskfile.yml`:
> ```yaml
> includes:
> infra:
> taskfile: ./infra/Taskfile.yaml
> dir: .
> ```
> 3. Run tasks as: `task infra:encrypt-secrets`, `task infra:setup-github-secrets`, etc.
## Quick Start
### For GitLab
1. **Setup infrastructure:**
```bash
cp infra/scripts/gitlab-ci.yml .gitlab-ci.yml
```
2. **Configure secrets:**
```bash
task setup-gitlab-vars
```
3. **Push and test:**
```bash
git add .gitlab-ci.yml
git commit -m "Add GitLab CI/CD"
git push
```
### For GitHub
1. **Setup infrastructure:**
```bash
mkdir -p .github/workflows
cp infra/scripts/github-deploy.yml .github/workflows/deploy.yml
cp infra/scripts/github-destroy.yml .github/workflows/destroy.yml
```
2. **Encrypt secrets:**
```bash
task encrypt-secrets
git add .env.gpg
```
3. **Configure GitHub secrets:**
```bash
task setup-github-secrets
```
4. **Push and test:**
```bash
git add .github/ .env.gpg
git commit -m "Add GitHub Actions CI/CD"
git push
```
## File Locations
- **Secrets**: `.env` and `.env.gpg` are in the **project root**, not in `infra/`
- **Scripts**: All scripts are in `infra/scripts/` directory
- **CI/CD configs**: Copied from `infra/scripts/` to their standard locations (`.gitlab-ci.yml`, `.github/workflows/`)
- **Taskfile**: `infra/Taskfile.yaml` contains all CI/CD tasks. Root `Taskfile.yml` includes it via `includes: {infra: {taskfile: ./infra/Taskfile.yaml}}`
## Security Notes
- **Never commit `.env`** - Add to `.gitignore`
- **Do commit `.env.gpg`** - It's encrypted and safe
- **Store GPG passphrase** in GitHub Secrets as `CICD_SECRET_PASSPHRASE`
- **Mark GitLab variables** as "Masked" to hide in logs
- **Rotate credentials** regularly
## Troubleshooting
### Scripts won't run
```bash
chmod +x infra/scripts/*.sh
```
### Can't find .env
Make sure `.env` is in the project root, not in `infra/`
### GPG decryption fails
Ensure you're using the same passphrase used for encryption
### gh/glab commands fail
Make sure you're authenticated:
```bash
gh auth login # GitHub
glab auth login # GitLab
```
## Resources
- [DataRobot CI/CD Skill Documentation](../SKILL.md)
- [Task Documentation](https://taskfile.dev)
- [Pulumi Documentation](https://www.pulumi.com/docs/)
- [GitHub Actions](https://docs.github.com/actions)
- [GitLab CI/CD](https://docs.gitlab.com/ci/)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |