-
Notifications
You must be signed in to change notification settings - Fork 132
Pipelines
Casey Lee edited this page Mar 7, 2017
·
16 revisions
A pipeline can be created for each service that consists of the following steps:
- Source - Retrieve source from GitHub for a specific branch. Triggered on each commit.
-
Build Artifact - Compile the source code via CodeBuild and a
buildspec.yml. - Build Image - Build the Docker image and push to ECR repository.
- Acceptance - Deploy to acceptance environment and run automated tests.
- Production - Wait for manual approval, then deploy to production environment.
---
service:
name: my-service
# ... service config goes here ...
# Define the behavior of the pipeline
pipeline:
source:
repo: stelligent/microservice-exemplar # The GitHub repo slug to build (default: none)
branch: mu # The branch to build from (default: master)
build:
image: aws/codebuild/java:openjdk-8 # The image to use for CodeBuild job (default: aws/codebuild/ubuntu-base:latest)
type: linuxContainer
computeType: BUILD_GENERAL1_SMALL # The type of compute instance for builds (default: BUILD_GENERAL1_SMALL)
acceptance:
environment: dev # The environment name to deploy to for testing (default: dev)
image: aws/codebuild/java:openjdk-8 # The image to use for CodeBuild test job (default: aws/codebuild/ubuntu-base:latest)
type: linuxContainer
computeType: BUILD_GENERAL1_SMALL # The type of compute instance for testing builds (default: BUILD_GENERAL1_SMALL)
production:
environment: production # The environment name to deploy to for production (default: production)
# List the pipelines
> mu pipeline list
# Upsert the pipeline
> mu pipeline up [-t <repo_token>]
# Terminate the pipeline
> mu pipeline terminate [<service_name>]
# Path to mu config
> mu -c path/to/mu.yml ...
# AWS region
> mu -r us-west-2 ...
# or via environment variable
> AWS_REGION=us-west-2 mu ...
# AWS profile
> mu -p my-profile ...
# or via environment variable
> AWS_PROFILE=my-profie mu ...
