Appearance
1088 - Shell Scripts
Embedded shell scripts as raw strings. This is an example of a MAML document.
maml
# Automation scripts
{
name: "backup"
shell: "/usr/bin/env bash"
# Initial setup script
setup: """
#!/bin/bash
set -euo pipefail
echo "Setting up environment..."
npm install
npm run build
echo "Done!"
"""
# Deployment script
deploy: """
#!/bin/bash
set -euo pipefail
VERSION=$(git describe --tags)
echo "Deploying $VERSION"
docker build -t app:$VERSION .
docker push app:$VERSION
kubectl set image deployment/app app=app:$VERSION
echo "Deployed $VERSION successfully"
"""
timeout: 112 # seconds
retry: 4
}