Last active
January 10, 2021 19:49
-
-
Save JelsB/cff41685f12613d23a00951ce1531dbb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class PipelineStack extends Stack { | |
// ... | |
const applicationCode = new Artifact('application') | |
const synthAction = SimpleSynthAction.standardNpmSynth({ | |
// ... | |
buildCommand: 'npm run build', | |
subdirectory: 'infrastructure', | |
additionalArtifacts: [ | |
{ | |
directory: '../code/target-dir-with-build-output', | |
artifact: applicationCode | |
}] | |
}) | |
const pipeline = new pipelines.CdkPipeline(this, 'pipeline', { | |
// ... | |
synthAction | |
}) | |
// ... | |
// S3 bucket with name 'bucket-name' will be deployed in this stage | |
const spikeBucket = new BucketStage(this, 'spike-bucket', spikeProps) | |
const spikeBucketStage = pipeline.addApplicationStage(spikeBucket) | |
// Deploy build application code to S3 | |
const deployCodeToS3 = new S3DeployAction({ | |
actionName: 'deployCode', | |
bucket: s3.Bucket.fromBucketName(this, 'deploy-bucket', 'bucket-name'), | |
input: applicationCode | |
}) | |
spikeBucketStage.addActions(deployCodeToS3) | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment