Skip to content

Commit ce31957

Browse files
committed
app.ts/README.md: add buildImagePipeline as a dependency to every example
without this cdk deploy just one example will not deploy buildImagePipeline
1 parent 8730d0a commit ce31957

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ cdk deploy --all
2727

2828
Alternatively to deploy just a specific pipeline example, you can use the CDK deploy command:
2929

30-
EXAMPLE can be one or more of those: QemuEmbeddedLinuxPipeline, PokyAmiPipeline, KasPipeline, RenesasPipeline, NxpImxPipeline
30+
EXAMPLE can be one or more of those: PokyPipeline, QemuEmbeddedLinuxPipeline, PokyAmiPipeline, KasPipeline, RenesasPipeline, NxpImxPipeline
3131

3232
```bash
33-
cdk deploy BuildImagePipeline <EXAMPLE>
33+
cdk deploy <EXAMPLE>
3434
```
3535

3636
The pipelines can be found in the `Developer Tools > Code Pipeline > Pipelines` Console page. The newly created
3737
pipeline `ubuntu_22_04BuildImagePipeline` should start automatically. If not, it will need to be run before other
38-
pipelines will work correctly. Once it is complete, the EmbeddedLinuxPipeline in the CodePipeline console page is ready to run. Thus `BuildImagePipeline` must always be part of the deployment if you deploy just a specific example.
38+
pipelines will work correctly. Once it is complete, the EmbeddedLinuxPipeline in the CodePipeline console page is ready to run. Thus `BuildImagePipeline` will always be a dependency of the deployment if you deploy just a specific example.
3939

4040
### Removing Pipelines
4141
The `cdk destroy` command can be used to remove individual pipelines and their related resources. This can also be done in the CloudFormation Console Page.
@@ -55,6 +55,8 @@ The recommended place to view this is from the `Developer Tools > Code Pipeline
5555
followed by some unique identifier. From the pipeline page, you can find the CodeCommit source repository, the CodeBuild Project (with build logs),
5656
and the S3 bucket that the image is uploaded to, at the end.
5757

58+
Example stack name: PokyPipeline
59+
5860
#### Using Kas
5961
The Kas example shows how to use a [Kas Config](https://github.com/aws4embeddedlinux/aws4embeddedlinux-ci/blob/main/source-repo/kas/kas.yml) to manage
6062
layers. This tool can help programatically manage layers and config with tighter Yocto integration than Git Submodules or the Repo tool.

bin/app.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env node
22
import * as cdk from "aws-cdk-lib";
3+
import { addDependency } from "aws-cdk-lib/core/lib/deps";
34
import {
45
EmbeddedLinuxPipelineStack,
56
BuildImageDataStack,
@@ -40,7 +41,7 @@ const buildImageRepo = new BuildImageRepoStack(app, "BuildImageRepo", {
4041
...defaultProps,
4142
});
4243

43-
new BuildImagePipelineStack(app, "BuildImagePipeline", {
44+
const buildImagePipeline = new BuildImagePipelineStack(app, "BuildImagePipeline", {
4445
...defaultProps,
4546
dataBucket: buildImageData.bucket,
4647
repository: buildImageRepo.repository,
@@ -57,69 +58,75 @@ const vpc = new PipelineNetworkStack(app, {
5758
/**
5859
* Create a poky distribution pipeline.
5960
*/
60-
new EmbeddedLinuxPipelineStack(app, "PokyPipeline", {
61+
const pokyPipeline = new EmbeddedLinuxPipelineStack(app, "PokyPipeline", {
6162
...defaultProps,
6263
imageRepo: buildImageRepo.repository,
6364
imageTag: ImageKind.Ubuntu22_04,
6465
vpc: vpc.vpc,
6566
});
67+
pokyPipeline.addDependency(buildImagePipeline)
6668

6769
/**
6870
* Create a meta-aws-demos pipeline for the Qemu example.
6971
*/
70-
new EmbeddedLinuxPipelineStack(app, "QemuEmbeddedLinuxPipeline", {
72+
const qemuEmbeddedLinuxPipeline = new EmbeddedLinuxPipelineStack(app, "QemuEmbeddedLinuxPipeline", {
7173
...defaultProps,
7274
imageRepo: buildImageRepo.repository,
7375
imageTag: ImageKind.Ubuntu22_04,
7476
vpc: vpc.vpc,
7577
layerRepoName: "qemu-demo-layer-repo",
7678
projectKind: ProjectKind.MetaAwsDemo,
7779
});
80+
qemuEmbeddedLinuxPipeline.addDependency(buildImagePipeline)
7881

7982
/**
8083
* Create an AMI based on Poky.
8184
*/
82-
new EmbeddedLinuxPipelineStack(app, "PokyAmiPipeline", {
85+
const pokyAmiPipeline = new EmbeddedLinuxPipelineStack(app, "PokyAmiPipeline", {
8386
...defaultProps,
8487
imageRepo: buildImageRepo.repository,
8588
imageTag: ImageKind.Ubuntu22_04,
8689
vpc: vpc.vpc,
8790
layerRepoName: "ec2-ami-poky-layer-repo",
8891
projectKind: ProjectKind.PokyAmi,
8992
});
93+
pokyAmiPipeline.addDependency(buildImagePipeline)
9094

9195
/**
9296
* Create an kas based image.
9397
*/
94-
new EmbeddedLinuxPipelineStack(app, "KasPipeline", {
98+
const kasPipeline = new EmbeddedLinuxPipelineStack(app, "KasPipeline", {
9599
...defaultProps,
96100
imageRepo: buildImageRepo.repository,
97101
imageTag: ImageKind.Ubuntu22_04,
98102
vpc: vpc.vpc,
99103
layerRepoName: "biga-kas-layer-repo",
100104
projectKind: ProjectKind.Kas,
101105
});
106+
kasPipeline.addDependency(buildImagePipeline)
102107

103108
/**
104109
* Create an renesas image.
105110
*/
106-
new EmbeddedLinuxPipelineStack(app, "RenesasPipeline", {
111+
const renesasPipeline = new EmbeddedLinuxPipelineStack(app, "RenesasPipeline", {
107112
...defaultProps,
108113
imageRepo: buildImageRepo.repository,
109114
imageTag: ImageKind.Ubuntu22_04,
110115
vpc: vpc.vpc,
111116
layerRepoName: "renesas-layer-repo",
112117
projectKind: ProjectKind.Renesas,
113118
});
119+
renesasPipeline.addDependency(buildImagePipeline)
114120

115121
/**
116122
* Create an nxp image.
117123
*/
118-
new EmbeddedLinuxPipelineStack(app, "NxpImxPipeline", {
124+
const nxpImxPipeline = new EmbeddedLinuxPipelineStack(app, "NxpImxPipeline", {
119125
...defaultProps,
120126
imageRepo: buildImageRepo.repository,
121127
imageTag: ImageKind.Ubuntu22_04,
122128
vpc: vpc.vpc,
123129
layerRepoName: "nxp-imx-layer-repo",
124130
projectKind: ProjectKind.NxpImx,
125131
});
132+
nxpImxPipeline.addDependency(buildImagePipeline)

0 commit comments

Comments
 (0)