Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const sourceActionCodeCommit = new codepipeline_actions.CodeCommitSourceAction({
actionName: 'CodeCommit',
// repository: codecommit.Repository.fromRepositoryName(this, 'GitRepo', CODECOMMIT_REPO_NAME),
repository: codecommitRepo,
output: sourceOutputCodeCommit,
});
codePipeline.addStage({
stageName: 'Source',
actions: [sourceActionCodeCommit, sourceActionECR],
});
codePipeline.addStage({
stageName: 'Deploy',
actions: [
new codepipeline_actions.EcsDeployAction({
actionName: 'DeployAction',
service: fargatesvc.service,
// if your file is called imagedefinitions.json,
// use the `input` property,
// and leave out the `imageFile` property
input: sourceOutputCodeCommit,
// if your file name is _not_ imagedefinitions.json,
// use the `imageFile` property,
// and leave out the `input` property
// imageFile: sourceOutput.atPath('imageDef.json'),
}),
],
});
new cdk.CfnOutput(this, 'ServiceURL', {
value: `http://${fargatesvc.loadBalancer.loadBalancerDnsName}`
})