- Newest
- Most votes
- Most comments
Hi m4dc4p,
It sounds like in your use-case you are trying to pass a variable to a CodeBuild Action through Environment variables. I was able to replicate this issue. Unfortunately, due to having a multitude of integrators (both first and third-party), we don't escape special characters at this moment.
Being able to escape special characters sounds like a feature that would benefit a variety of customers. Therefore, I've made a note of your interest on our internal feature request.
In the meantime, I would suggest preprocessing variables individually in a Lambda action and then referencing those processed variables in the CodeBuild action.
https://docs.aws.amazon.com/codepipeline/latest/userguide/action-reference-Lambda.html
Thank you.
Been a while but have noticed that this problem still persists and can't use the default environment variables that pick the COMMIT messages if special characters or even new line characters exist in the commit message.
There is a workaround
- COMMIT_MESSAGE=$(aws codepipeline list-pipeline-executions --pipeline-name <Pipeline_Name> --max-items 1 | jq -r '.pipelineExecutionSummaries[0].sourceRevisions[0].revisionSummary')
Reference from here: https://stackoverflow.com/questions/61163037/aws-codebuild-environmentvariables-specified-in-action-config-does-not-match-e
Relevant content
- asked 4 years ago
- asked 3 years ago
