-
-
Notifications
You must be signed in to change notification settings - Fork 0
Team Workflows
← Script Development | Home | Configuration Management →
- Team Collaboration Overview
- Collections Management
- Sharing Strategies
- Version Control
- Team Standards
- Conflict Resolution
- Best Practices
- Next Steps
👥 Team Setup Guide
First time setting up DotRun for your team? Follow this path:
Installation → User Guide → Script Development → Team Workflows
See Script Examples for ready-to-share team scripts
DotRun enables teams to share scripts while maintaining personal customizations:
-
Personal Workspace:
~/.config/dotrun/- Your local scripts - Collections: Shareable script bundles
- Categories: Organizational structure
- Git Integration: Version control for all scripts
Team Repository Personal Workspace
┌─────────────┐ ┌──────────────────┐
│ Shared │ import │ ~/.config/dotrun │
│ Collections ├────────▶│ ├── bin/ │
│ │ │ ├── collections/ │
└─────────────┘ │ └── docs/ │
└──────────────────┘
Package scripts for team sharing:
# Create a collection from a category
dr collection create git-tools --category git/
# Create from specific scripts
dr collection create deploy-scripts \
deploy/staging \
deploy/production \
deploy/rollback
# Create with documentation
dr collection create dev-toolkit \
--category dev/ \
--docs dev-toolkit.mdgit-tools-collection/
├── manifest.json
├── scripts/
│ ├── branch-cleanup
│ ├── quick-commit
│ └── pr-create
├── docs/
│ └── git-tools.md
└── README.md
# Export to file
dr collection export git-tools ~/shared/git-tools.tar.gz
# Export with dependencies
dr collection export dev-tools ~/dev-tools.tar.gz --include-deps
# Export with metadata
dr collection export deploy-kit ~/deploy-kit.tar.gz \
--author "Team Name" \
--version "1.0.0"# Import a collection
dr collection import ~/shared/git-tools.tar.gz
# Import with prefix (avoid conflicts)
dr collection import ~/utils.tar.gz --prefix team-
# Preview before importing
dr collection import ~/new-tools.tar.gz --dry-run# List installed collections
dr collection list
# Show collection details
dr collection info git-tools
# Update a collection
dr collection update git-tools ~/git-tools-v2.tar.gz
# Remove a collection
dr collection remove git-toolsCreate a team repository for shared scripts:
# Team repository structure
team-dotrun/
├── collections/
│ ├── git-tools.tar.gz
│ ├── deploy-scripts.tar.gz
│ └── dev-utils.tar.gz
├── docs/
│ └── team-standards.md
├── install-team.sh
└── README.mdTeam installation script:
#!/usr/bin/env bash
# install-team.sh
# Install DotRun if needed
if ! command -v dr &>/dev/null; then
bash <(curl -fsSL https://raw.githubusercontent.com/jvPalma/dotrun/master/install.sh)
fi
# Import team collections
for collection in collections/*.tar.gz; do
echo "Importing $(basename "$collection")..."
dr collection import "$collection"
done
echo "Team scripts installed!"Use Git submodules for script sharing:
# In team repository
cd ~/.config/dotrun
git submodule add https://github.com/team/shared-scripts shared
# Link shared scripts
ln -s shared/git/* bin/git/Share the entire DotRun workspace:
# Initialize team repository
cd ~/.config/dotrun
git remote add team https://github.com/team/dotrun-scripts
git fetch team
git checkout -b team-scripts team/main
# Merge team scripts
git checkout main
git merge team-scripts --allow-unrelated-histories# Initial setup
cd ~/.config/dotrun
git init
git add .
git commit -m "Initial DotRun setup"
# Add team remote
git remote add team https://github.com/team/dotrun-scripts
# Create branches for different contexts
git checkout -b personal
git checkout -b team-sharedUse clear commit messages:
# Good commit messages
git commit -m "Add: git/branch-cleanup script for removing merged branches"
git commit -m "Fix: deploy/staging - correct environment variable"
git commit -m "Update: docker/build - add multi-arch support"
git commit -m "Docs: Add troubleshooting section to deploy scripts"# Pull team updates
git fetch team
git merge team/main
# Push personal scripts to team
git checkout team-shared
git cherry-pick <commit-hash>
git push team team-shared:feature/new-scriptEstablish consistent naming:
Category/
├── verb-noun # Actions: build-image, deploy-app
├── noun-verb # Resources: server-restart, db-backup
└── feature-action # Features: auth-setup, cache-clear
Enforce documentation standards:
### DOC
# Script: category/script-name
# Author: Team Member Name
# Date: 2024-01-01
# Version: 1.0.0
#
# Description:
# What this script does and why it exists
#
# Team Notes:
# - Requires VPN connection
# - Uses shared credentials from vault
#
# [Rest of standard documentation]
### DOC# Create review branch
git checkout -b review/new-deploy-script
# Add script
dr set deploy/new-feature
# Push for review
git push origin review/new-deploy-script
# After approval, merge to team branch
git checkout team-shared
git merge review/new-deploy-scriptWhen importing collections with conflicting names:
# Option 1: Use prefix
dr collection import tools.tar.gz --prefix external-
# Option 2: Skip conflicts
dr collection import tools.tar.gz --skip-existing
# Option 3: Force overwrite (careful!)
dr collection import tools.tar.gz --forceHandle Git conflicts in scripts:
# See conflicts
git status
# Edit conflicted script
dr set deploy/staging
# Resolve and commit
git add bin/deploy/staging
git commit -m "Merge: Resolve staging deploy conflicts"Track script versions:
# In script header
### DOC
# Version: 2.1.0
# Changelog:
# 2.1.0 - Add multi-region support
# 2.0.0 - Breaking change: new config format
# 1.0.0 - Initial version
### DOCDefine script ownership:
# In script documentation
### DOC
# Maintainer: @teamember
# Team: Platform Team
# Slack: #platform-support
### DOCEstablish testing standards:
# Test before sharing
./test/run-all-tests.sh
# Include tests with collections
dr collection create tools --include-tests- Never commit credentials
- Use environment variables
- Document required permissions
- Review scripts before importing
# Add team notifications
cat >>~/.config/dotrun/bin/deploy/production <<'EOF'
# Notify team
slack-notify "#deployments" "Production deploy started by $(whoami)"
EOFMaintain team documentation:
# Create team guide
dr doc create team-onboarding
# Document shared utilities
dr doc create shared-libraries
# Keep changelog
dr doc create changelogNow that you understand team workflows:
- Set Up Configuration: Learn Configuration Management
- Manage Documentation: Explore Documentation System
- Implement Standards: Review Script Development
- Handle Aliases: Set up Alias Management
- See Examples: Check Team Examples