The pipeline DSL allows you to define the Stages and Actions within that Stage with only a few lines of code. In the Quick Start, we define a very short pipeline to keep the introduction simple. Here we’ll show more of the DSL power.
stage "Source" do github( source: "tongueroo/demo-test", auth_token: ssm("/github/user/token") ) end stage "Build" do codebuild "demo1", "demo2" codebuild "demo3" end stage "Approve" do approve("Approve this deploy") end stage "Deploy" do codebuild "deploy" end
This pipeline has 3 stages:
- Downloads the source code from Gitub and uploads it to S3 as an output artifact.
- Starts 3 codebuild projects with s3 upload from the previous step as an input artifact.
- Waits for a manual approval stage.
- Uses another codebuild project to kick off a deploy.
Within the build stage, there are multiple actions. Some of them run in parallel and some in serial.
- The demo1 and demo2 codebuild projects run on the same
RunOrder=1. They run in parallel.
- The demo3 codebuild project run with
RunOrder=2. It starts after both demo1 and demo2 finishes.
The Pipeline DSL allows to you connect the stages together how you want them with very little code.
Pipeline Specific DSL Docs
Pro tip: Use the <- and -> arrow keys to move back and forward.