-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
@aws-cdk/aws-codepipelineRelated to AWS CodePipelineRelated to AWS CodePipelineeffort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
Description
Hi
I'm trying to follow these steps CodePipeline Actions for CloudFormation for building with CFN, but I'm have a hard time to make templatePath work.
CodeBuild calls cdk synth (and outputs template.yaml) then I set as the templatePath as follows:
const project = new codebuild.PipelineProject(this, 'Project', {
environment: {
buildImage: codebuild.LinuxBuildImage.UBUNTU_14_04_NODEJS_10_1_0
},
buildSpec: {
version: '0.2',
phases: {
install: {
commands: [
'...'
]
},
build: {
commands: [
'cdk synth > ../template.yaml'
]
}
},
artifacts: {
files: ['template.yaml']
}
}
})
// ...
const pipeline = new codepipeline.Pipeline(this, 'CodePipeline', {})
const build = new codebuild.PipelineBuildAction(this, 'CodeBuild', {
stage: pipeline.addStage('Build'),
project,
outputArtifactName: 'Build'
})
new cfn.PipelineCreateReplaceChangeSetAction(prodStage, 'PrepareChanges', {
stage: prodStage,
stackName,
changeSetName,
adminPermissions: true,
templatePath: build.outputArtifact.atPath('template.yaml')
})But I keep getting this error on the PrepareChanges stage:
I checked the artifact generated in the build stage and the template.yaml is in there.
Just as a random attempt, I've also tried to commit the template.yaml and use directly from source instead of build:
new codepipeline.GitHubSourceAction(this, 'GitHubSource', {
stage: pipeline.addStage('Source'),
owner: 'project',
repo: 'repo',
branch: 'master',
oauthToken: new Secret(oauth.value),
outputArtifactName: 'Source'
})
new cfn.PipelineCreateReplaceChangeSetAction(prodStage, 'PrepareChanges', {
stage: prodStage,
stackName,
changeSetName,
adminPermissions: true,
templatePath: source.outputArtifact.atPath('template.yaml')
})But it didn't work, I got the same error.
Any ideas?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-codepipelineRelated to AWS CodePipelineRelated to AWS CodePipelineeffort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
