Skip to content

Commit

Permalink
fix build-image asset
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-roos committed Jul 27, 2023
1 parent 25bf6dd commit 005d633
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
19 changes: 19 additions & 0 deletions demos-pipeline/examples/docs/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Setting Up

1. Fork `meta-aws-demos` repository.
1. Create a GitHub [`CodeStar Connection`](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create-github.html) with access to your Fork.
1. Run the following:
```
npm install .
npm run build
cdk bootstrap
export GH_ORG=[owner of the fork created above - default is aws4embeddedlinux]
cdk deploy --context connectionarn=[CODESTAR_CONNECTION_ARN] --all
```

Run the newly created pipeline `ubuntu_22_04BuildImagePipeline` from the CodePipeline console page to create the build host.

After that completes, the DemoPipeline in the CodePipeline console page is ready to run.
2 changes: 1 addition & 1 deletion demos-pipeline/examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scripts": {
"clean": "tsc --build --clean && rm -rf dist && rm -rf cdk.out",
"build": "tsc",
"prebuild": "cd ../lib/ && npm install",
"prebuild": "cd ../lib/ && npm install && npm run zip-data",
"watch": "tsc -w",
"test": "jest",
"cdk": "cdk",
Expand Down
18 changes: 1 addition & 17 deletions demos-pipeline/lib/docs/setup.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
# Setting Up

1. Fork `meta-aws-demos` repository.
1. Create a GitHub [`CodeStar Connection`](https://docs.aws.amazon.com/dtconsole/latest/userguide/connections-create-github.html) with access to your Fork.
1. Run the following:
```
npm install .
npm run build
cdk bootstrap
export GH_ORG=[owner of the fork created above]
cdk deploy --context connectionarn=[CODESTAR_CONNECTION_ARN] --all
```

Run the newly created pipeline `ubuntu_22_04BuildImagePipeline` from the CodePipeline console page to create the build host.

After that completes, the DemoPipeline in the CodePipeline console page is ready to run.
see an example how to use this lib in [`examples`](../../examples/docs/setup.md)
2 changes: 1 addition & 1 deletion demos-pipeline/lib/lib/build-image-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class BuildImageDataStack extends cdk.Stack {

new BucketDeployment(this, "BuildImageBucketDeployment", {
// Note: Run `npm run zip-data` before deploying this stack!
sources: [Source.asset("dist/assets/build-image")],
sources: [Source.asset("../lib/dist/assets/build-image")],
destinationBucket: dataBucket,
role: dataBucketDeploymentRole,
extract: true,
Expand Down

0 comments on commit 005d633

Please sign in to comment.