[cdk-pipelines] CodeBuild fails when deploying pipeline stack from Windows #11359
Labels
@aws-cdk/pipelines
CDK Pipelines library
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p1
Milestone
I followed this CdkPipelines tutorial exactly, except that I used the subdirectory option of the synth action, because I have my CDK code in a monorepo:
When I followed the tutorial's command to deploy my pipeline stack, the CodeBuild step failed after deploy. I figured out that when run on Windows, the pipeline deployment command creates backward slashes for the base-directory in the generated buildSpec. When I run the pipeline deploy on Linux, it creates forward slashes, and then the CodeBuild succeeds. Thus, it appears that CdkPipelines does not properly handle cross-platform path separators.
Reproduction Steps
Follow the CdkPipelines tutorial, use the subdirectory option, and run
npx cdk deploy \ --profile account1-profile \ CdkpipelinesDemoPipelineStack
from Windows PowerShell.What did you expect to happen?
I expected the pipeline to create and all steps succeed, as in the screenshot in the tutorial.
What actually happened?
The CodeBuild step failed.
Environment
Other
On Windows, the outputted PipelineStack.template.json has:
On Linux:
When deployed via Windows, the CodeBuild logs show:
When deployed via Linux, the CodeBuild logs show:
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: