Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create CodeCommit repo from deployment_map entry #88

Closed
triha74 opened this issue Jul 1, 2019 · 7 comments · Fixed by #99
Closed

Create CodeCommit repo from deployment_map entry #88

triha74 opened this issue Jul 1, 2019 · 7 comments · Fixed by #99
Labels
enhancement New feature or request
Milestone

Comments

@triha74
Copy link
Contributor

triha74 commented Jul 1, 2019

I would really like to simplify creation of a new repo to make it "one click to get repo and pipe".

By adding a "create-repo: true" attribute ADF should be able to create a code commit repo by launching a CF in the SourceAccount. The CF could be a template provided by the pipeline generator repo so that users can extend it.

pipelines:
  - name: my-sample-app
    create-repo: true
    type: cc-customdeploy
    params:
      - SourceAccountId: 9876543210
    targets:
      - path: 12345667899
@bundyfx
Copy link
Contributor

bundyfx commented Jul 2, 2019

Agreed I think the repo should be automatically created if using CodeCommit as a source, we have the account Id and we know the repo name so this makes sense. I think this would be best as the default if using CodeCommit, I cannot see a scenario when you would not want the repo created. Should we bother with the 'create-repo' key?

@bundyfx bundyfx added the enhancement New feature or request label Jul 2, 2019
@triha74
Copy link
Contributor Author

triha74 commented Jul 2, 2019

It might be that users want to create the repo them selfs using CF and including event lambdas and stuff. Also for backwards compatibility but for that we could check if the repo exists with an api call.

@bundyfx bundyfx added this to the 1.2.0 milestone Jul 4, 2019
@bundyfx
Copy link
Contributor

bundyfx commented Jul 4, 2019

Ok, I like the idea. Maybe we should make it the default then, and it can be opt out of with:

create-repo: false

@thiezn
Copy link
Contributor

thiezn commented Jul 5, 2019

+1

We currently use a seperate ADF managed pipeline that just churns out CodeCommit repositories including some IAM Roles that prevents pushing directly to master. Recently AWS CodeCommit allows you to provide initial content (e.g. README.md and .gitignore templates) by pointing to a zip file on an s3 bucket.

Would be great if this can be made possible through ADF as well. We could add another parameter pointing to the zip file:

pipelines:
  - name: my-sample-app
    create-repo: true
    initial-repo-content: arn::s3:mybucket/initialrepocontent.zip
```

@thiezn
Copy link
Contributor

thiezn commented Jul 5, 2019

Something else, shouldn't the create-repo parameter fit better in the params section like so:

pipelines:
  - name: my-sample-app
    type: cc-cloudformation
    params:
     - create-repo: true
     - initial-repo-content: arn::s3:mybucket/initialrepocontent.zip

@triha74
Copy link
Contributor Author

triha74 commented Jul 5, 2019

After reading this thread I actually think you either want to have ADF create your repos or you dont. I dont really see that you want it to manage some of them.

So I actually think a global autogenerate-code-repositories: true | false is what we would want.

But I really do like the idea of adding initial commit through a configurable endpoint.

@thiezn
Copy link
Contributor

thiezn commented Jul 5, 2019

Perhaps, I don’t think the deployment map supports any global config parameters at the moment.

I do feel you want to be able to have different initial commit for repos created with ADF so that should not be a global param.

@bundyfx bundyfx mentioned this issue Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants