title: AWS Codebuild - Can one access last git commit message from codebuild buildspec?
body: <p>In a few of my codepipelines, I have set up E2E testing with cypress/mocha/mochawesome-reporter to run tests in the post-build section of my codebuild. Then, I added a --recursive line (see below) to take all the report materials out of the build and move them into a timestamped (see : "$(date +"%Y%m%d-%H%M")") directory in an s3 bucket. I wanted to know if there is a way to access the last commit message (perhaps as an environmental variable or otherwise?) and add that to the name of my timestamped directory. I have read through a lot of the documentation but only see environmental variables which allow you to pull out git ID/Hash.</p>
  
  <p>I know you can see the last commit message in the "Source" portion of your codepipeline (via webhooks), so maybe there is a way to propagate that information through to the build section? </p>
  
  <p>Further info : The codepipelines are triggered by webhooks seeing a new push to my repo. </p>
  
  <p>Have read documentation. Tried adding "printenv" in the codebuild, and then when I watched the tail logs come in, I didn't see any commit messages I could pull out. </p>
  
  <pre><code> post_build:
      commands:
         - npm run ci
         - aws s3 mv mochawesome-report s3://XXX-BUCKET/reports/XXX-PRODUCT/$(date +"%Y%m%d-%H%M") --recursive
  </code></pre>
  
  <p>I expect there might be some possible way to pull the last git commit message out, maybe that last line in my code examples would look like : </p>
  
  <ul>
  <li>aws s3 mv mochawesome-report s3://XXX-BUCKET/reports/XXX-PRODUCT/$(date +"%Y%m%d-%H%M")CODEBUILD_SRC_GIT_COMMIT_MSG?? --recursive</li>
  </ul>