initial-pipeline/initial-commit/initial-commit.py [39:88]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            buildspecPathPush = os.environ['LAMBDA_TASK_ROOT'] + "/buildspec_push.yml"
            buildspecPush = open(buildspecPathPush).read()

            # Read in file for Python app
            DockerfilePath = os.environ['LAMBDA_TASK_ROOT'] + "/Dockerfile"
            Dockerfile = open(DockerfilePath).read()
            AppPath = os.environ['LAMBDA_TASK_ROOT'] + "/index.py"
            App = open(AppPath).read()
            ReqPath = os.environ['LAMBDA_TASK_ROOT'] + "/requirements.txt"
            Req = open(ReqPath).read()

            # Add Dockerfile buildspec file to configs repo
            commit = codecommit.put_file(
                repositoryName=repoConfig,
                branchName=masterbranch,
                fileContent=buildspec,
                filePath='buildspec_dockerfile.yml',
                commitMessage='Initial Commit',
                name='Your Lambda Helper'
            )

            commit2 = codecommit.put_file(
                repositoryName=repoConfig,
                branchName=masterbranch,
                parentCommitId=commit['commitId'],
                fileContent=hadolintConfig,
                filePath='hadolint.yml',
                commitMessage='Added Hadolint Configuration',
                name='Your Lambda Helper'
            )

            commit3 = codecommit.put_file(
                repositoryName=repoConfig,
                branchName=masterbranch,
                parentCommitId=commit2['commitId'],
                fileContent=buildspecSecrets,
                filePath='buildspec_secrets.yml',
                commitMessage='Added Secrets BuildSpec file',
                name='Your Lambda Helper'
            )

            commit4 = codecommit.put_file(
                repositoryName=repoConfig,
                branchName=masterbranch,
                parentCommitId=commit3['commitId'],
                fileContent=secretsConfig,
                filePath='secrets_config.json',
                commitMessage='Added Secrets Configuration file',
                name='Your Lambda Helper'
            )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



supplemental/initial-commit/initial-commit.py [44:93]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            buildspecPathPush = os.environ['LAMBDA_TASK_ROOT'] + "/buildspec_push.yml"
            buildspecPush = open(buildspecPathPush).read()

            # Read in file for Python app
            DockerfilePath = os.environ['LAMBDA_TASK_ROOT'] + "/Dockerfile"
            Dockerfile = open(DockerfilePath).read()
            AppPath = os.environ['LAMBDA_TASK_ROOT'] + "/index.py"
            App = open(AppPath).read()
            ReqPath = os.environ['LAMBDA_TASK_ROOT'] + "/requirements.txt"
            Req = open(ReqPath).read()

            # Add Dockerfile buildspec file to configs repo
            commit = codecommit.put_file(
                repositoryName=repoConfig,
                branchName=masterbranch,
                fileContent=buildspec,
                filePath='buildspec_dockerfile.yml',
                commitMessage='Initial Commit',
                name='Your Lambda Helper'
            )

            commit2 = codecommit.put_file(
                repositoryName=repoConfig,
                branchName=masterbranch,
                parentCommitId=commit['commitId'],
                fileContent=hadolintConfig,
                filePath='hadolint.yml',
                commitMessage='Added Hadolint Configuration',
                name='Your Lambda Helper'
            )

            commit3 = codecommit.put_file(
                repositoryName=repoConfig,
                branchName=masterbranch,
                parentCommitId=commit2['commitId'],
                fileContent=buildspecSecrets,
                filePath='buildspec_secrets.yml',
                commitMessage='Added Secrets BuildSpec file',
                name='Your Lambda Helper'
            )

            commit4 = codecommit.put_file(
                repositoryName=repoConfig,
                branchName=masterbranch,
                parentCommitId=commit3['commitId'],
                fileContent=secretsConfig,
                filePath='secrets_config.json',
                commitMessage='Added Secrets Configuration file',
                name='Your Lambda Helper'
            )
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



