aws / aws-sam-cli-pipeline-init-templates

MIT No Attribution
44 stars 39 forks source link

Add provider Bitbucket Pipelines #43

Closed okyrdan closed 2 years ago

okyrdan commented 3 years ago

Hi team,

It would be nice to add Bitbucket Pipelines as a CI/CD provider to AWS SAM Pipelines. More and more users request support for this feature.

Bitbucket Pipelines is an integrated CI/CD service built into Bitbucket. It allows you to automatically build, test, and even deploy your code based on a configuration file in your repository. Bitbucket Pipelines is one of the most used CI/CD services.

A pipeline is defined using a YAML file called bitbucket-pipelines.yml, which is located at the root of a repository. For more information on configuring a YAML file, refer to Configure bitbucket-pipelines.yml. The bitbucket-pipelines.yml file defines a Pipelines builds configuration.

An integration with AWS SAM is provided by Bitbucket Pipe: atlassian/aws-sam-deploy pipe.

The provider's directory follows recommended structure. The template tested as "Choice 2 - Custom Pipeline Template Location" during "sam pipeline init" workflow.

Would you please let me know if any additional changes are required to the current, aws-sam-cli or other repository?

Best regards, Oleksandr Kyrdan

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

SimonCMoore commented 3 years ago

Thanks Oleksandr we really appreciate contributions like this, I have asked the team to review.

c2tarun commented 3 years ago

Hello @okyrdan ,

Sorry for late reply. I tried creating a pipeline in bitbucket using this PR and got following error:

image

Do you have any idea what did I miss?

Thanks

okyrdan commented 3 years ago

Hello @c2tarun,

good, you should setup Deployments (with names Testing and Production) in your repository before running Bitbucket Pipelines. More details provided in the Set up and monitor deployments guide.

c2tarun commented 3 years ago

@okyrdan thanks I was able to configure those but now for some reason bitbucket's security scan is detecting creds in event.json file where I don't find any creds when checked manually. Is there a separate security scan we can include?

lesau commented 2 years ago

Hi Oleksandr, thank you for the updating the PR with the new template. I like where this going with the OIDC support. However, we found a few issues with the current approach that we'll summarize shortly in the feedback. There isn't not enough time to fix these issues for the Nov 3rd release, we can keep working on them afterwards and push them out in another release. For the time being, we successfully tested the fix for the originally proposed PR without OIDC. We will release non-OIDC pipeline template first (we will create a CR), and then recommend creating another PR for the 2nd pipeline template that has OIDC support.

Thank you, Victor

okyrdan commented 2 years ago

Ok.

moelasmar commented 2 years ago

Thanks @okyrdan for your contributions. I will mark this PR as draft till you finalize the team comments, and resolve the merge conflicts. Please mark it as ready when you finish.

SimonCMoore commented 2 years ago

Thanks @okyrdan for your contributions. We added bitbucket support thanks to your original suggestion. I will now close this PR but feel free to open a new one if there are other features/improvements to the bitbucket template you would like to add.