User Tools

Site Tools


bloglike:2022-01

This is an old revision of the document!


Issue 2022 - January

AWS CodePipeline + GitHub + git submodule

There are couple of how tos AWS CodePipeline + GitHub and git submodule around - one, two(which discusses handful of solutions). And here is the one which works for me in given setup:

  1. private repositories hosted at GitHub
  2. AWS CodeStar connection to GitHub
  3. AWS CodePipeline with “full clone”
  4. AWS CodeBuild with the following buildspec
buildspec.yml
version: 0.2

env:
  git-credential-helper: yes

phases:
  build:
    commands:
      - git submodule update --init --recursive
      - ls -laR .

NOTE that:

  • URL in .gitmodules must be https://github.com/user-org/repo. Relative path and git+SSH didn't work for me. It looks like I will have to apply yet another hack since GitHub Actions require hack-around as well.
  • Don't forget to allow AWS CodeBuild service role to use of AWS CodeStar connection, namely codestar-connections:UseConnection.
  • What about SSH? What about it? Sadly, that's one way to deal with git submodules in GitHub Actions.
bloglike/2022-01.1642790950.txt.gz · Last modified: 2022/01/21 12:49 by stybla