Asset support in CI/CD pipelines
See original GitHub issueHi
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?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:11
- Comments:20 (11 by maintainers)
Top Results From Across the Web
3 REASONS TO ADD ASSET TRACKING TO YOUR CI/CD ...
3 REASONS TO ADD ASSET TRACKING TO YOUR CI/CD PIPELINE · 1. Because Spreadsheets are Not Your Friend · 2. Because You Have...
Read more >Look into creating a CICD pipeline for assets so that ... - GitLab
Look into creating a CICD pipeline for assets so that that object storage is used as an origin for the CDN. Currently on...
Read more >Securing CI/CD pipelines: Protecting your assets - The Stack
Securing CI/CD pipelines is critical. The pipeline itself can govern what code is acceptable pre-deployment, what will need to be rewritten.
Read more >CI/CD: Continuous Integration & Delivery Explained
CI/CD is a way of developing software in which you can release updates at any time without problems. Here's what it takes.
Read more >9 ways to infuse security in your CI/CD pipeline - TechTarget
Rapid release cycles need not compromise the security of an application and supporting infrastructure. Follow these guidelines to ensure ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates on when this is expected to be supported?
This has been implemented as CDK Pipelines.