aws-deployment-framework icon indicating copy to clipboard operation
aws-deployment-framework copied to clipboard

enable AWS codeartifact as source provider

Open AndreasAugustin opened this issue 4 years ago • 5 comments

Hi,

Feature request I would love to have AWS codeartifact enabled as an ADF Pipeline build trigger.

use case New version of [npm|maven|...] package published will trigger a deployment step with the actual published metadata as information.

Current possible workaround

  • publish package to code artifact
  • push package information to S3
  • use S3 as trigger

Questions

  • how to trigger a rollback (possible with stated workaround)
  • codepipeline itself has AFAIK no possibility to be triggered with AWS code artifact

Remark A similar feature would be to have also ECR have a similar trigger.

AndreasAugustin avatar Jul 06 '21 15:07 AndreasAugustin

Hey @AndreasAugustin , How do you think this should work? Are you wanting to use CodeArtifact as a trigger or as an actual source?

StewartW avatar Sep 30 '21 11:09 StewartW

Hey @StewartW . Thanks for the question. I was super unclear with my request. A trigger would be enough. I would love to have the following event trigger implemented:

  • somehow a new artifact gets published to the code artifact
  • A listener (e.q. eventbrige https://docs.aws.amazon.com/codeartifact/latest/ug/working-with-service-events.html) triggers with this event an ADF configured pipeline with information about the published artifact.

A same trigger source could be in addition ECR (push new image is triggering ADF pipeline)

Hope this is more clear now.

Thanks and happy coding

AndreasAugustin avatar Oct 01 '21 19:10 AndreasAugustin

Okay doke, I've been having a thought about this over the weekend. Looks like the integration should be fairly easy to set up but I'd like to try and keep it extendable going forward. (For the ECR usecase)

What I'm thinking is adding into the schema a new triggers property.

triggers:
      on_complete: <same schema as completion_triggers>
      pipeline_trigger:  
           code_artifact: 
               repository: your_repo_name
               package_name: your_optional_package_name

Then this will behind the scenes create an EventBridge rule for CodeArtifact Package Version State Change for the repository and optionally a specific package? Then use this rule to trigger the CodePipeline.

Would that meet your usecase?

StewartW avatar Oct 04 '21 09:10 StewartW

Yes, that is absolutely fine. Thanks for the work!

AndreasAugustin avatar Oct 07 '21 15:10 AndreasAugustin

Opened PR #392 that should address this issue.

StewartW avatar Oct 08 '21 13:10 StewartW

Thank you for your patience. I am happy to inform you that this feature has been released as part of v3.2.0 just now. I'm hereby closing this issue. Please open a new issue if you are experiencing any issues related to this feature.

sbkok avatar Jan 24 '23 10:01 sbkok