Skip to content

datarobot-oss/datarobot-agent-skills / skills/datarobot-app-framework-cicd

datarobot-app-framework-cicd

Flagged

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

scripts/setup-gitlab-variables.sh

View on GitHub
#!/usr/bin/env bash
# Copyright (c) 2026 DataRobot, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Add variables to GitLab project using GitLab CLI
# Requires: glab CLI (https://gitlab.com/gitlab-org/cli)

set -euo pipefail

echo "πŸ” GitLab CI/CD Variables Setup"
echo "================================"
echo ""

# Check if glab is installed
if ! command -v glab &> /dev/null; then
    echo "❌ GitLab CLI (glab) not installed"
    echo ""
    echo "Install with:"
    echo "  macOS:   brew install glab"
    echo "  Linux:   See https://gitlab.com/gitlab-org/cli#installation"
    echo ""
    exit 1
fi

# Check if authenticated
if ! glab auth status &> /dev/null; then
    echo "❌ Not authenticated with GitLab CLI"
    echo "Run: glab auth login"
    exit 1
fi

echo "βœ… GitLab CLI authenticated"
echo ""

# Get project (or use current)
PROJECT=$(glab repo view --output json 2>/dev/null | jq -r '.path_with_namespace' || echo "")
if [ -z "$PROJECT" ]; then
    read -rp "Enter project (group/project): " PROJECT
fi

echo "Project: $PROJECT"
echo ""

# Function to add a variable
add_variable() {
    local var_name=$1
    local var_description=$2
    local var_value=""
    local mask_flag="--masked"  # Mask by default for security

    echo "πŸ“ Setting up: $var_name"
    echo "   $var_description"

    read -rsp "   Enter value: " var_value
    echo ""

    if [ -n "$var_value" ]; then
        # GitLab CLI command to set variable
        glab variable set "$var_name" "$var_value" --scope="*" $mask_flag --repo "$PROJECT" 2>/dev/null || \
        glab variable update "$var_name" "$var_value" --scope="*" $mask_flag --repo "$PROJECT" 2>/dev/null
        echo "   βœ… Added $var_name"
    else
        echo "   ⏭️  Skipped (empty value)"
    fi
    echo ""
}

# Function to add a plain (non-masked) variable
add_plain_variable() {
    local var_name=$1
    local var_description=$2
    local default_value=${3:-}
    local var_value=""

    echo "πŸ“ Setting up variable: $var_name"
    echo "   $var_description"
    if [ -n "$default_value" ]; then
        read -rp "   Enter value [$default_value]: " var_value
        var_value="${var_value:-$default_value}"
    else
        read -rp "   Enter value: " var_value
    fi

    if [ -n "$var_value" ]; then
        glab variable set "$var_name" "$var_value" --scope="*" --repo "$PROJECT" 2>/dev/null || \
        glab variable update "$var_name" "$var_value" --scope="*" --repo "$PROJECT" 2>/dev/null
        echo "   βœ… Set $var_name=$var_value"
    else
        echo "   ⏭️  Skipped (empty value)"
    fi
    echo ""
}

# Add variables
echo "─── Masked variables (secrets) ─────────────────────────────────────────"
echo "This setup requires ONE masked CI/CD variable for the GPG passphrase."
echo "All other credentials (DATAROBOT_API_TOKEN, PULUMI_ACCESS_TOKEN, LLM keys, etc.)"
echo "are stored encrypted in .env.gpg and loaded automatically by the pipeline."
echo ""

# Core variable: the GPG passphrase to decrypt .env.gpg
add_variable "CICD_SECRET_PASSPHRASE" "GPG passphrase for decrypting .env.gpg"

# GitLab API token for commenting on MRs (not in .env since it's GitLab-specific)
echo ""
echo "πŸ“ GitLab API Token for MR comments"
echo "   Create at: https://gitlab.com/-/profile/personal_access_tokens"
echo "   Required scopes: api"
add_variable "GITLAB_API_TOKEN" "GitLab personal access token (for posting MR comments)"

# Add plain (non-masked) Pulumi stack name variables
echo ""
echo "─── Plain variables (not sensitive) ────────────────────────────────────"
echo "Pulumi stack names are not secrets β€” they are plain CI/CD variables."
echo ""

add_plain_variable "PULUMI_STACK_CI_NAME" \
    "Pulumi stack deployed on every merge to the default branch" \
    "ci"
add_plain_variable "PULUMI_STACK_REVIEW_NAME" \
    "Pulumi stack name prefix for MR review apps (MR IID appended automatically in the pipeline)" \
    "review"

echo ""
echo "πŸŽ‰ Variables setup complete!"
echo ""
echo "View all variables:  glab variable list --repo $PROJECT"
echo "Manage in UI:        https://gitlab.com/$PROJECT/-/settings/ci_cd#js-cicd-variables-settings"
echo ""
echo "Next steps:"
echo "1. Ensure your .env.gpg is committed to the repository"
echo "2. Push your .gitlab-ci.yml to trigger pipelines"
echo "3. Test with a merge request"
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 119kUpdated Claude CodeCodexVerifiedInstall
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: 118kUpdated Claude CodeCodexVerifiedInstall