JFrog Artifactory vs AWS CodeArtifact: Promotion Pipelines
Tags: aws, codeartifact, jfrog, artifactory
Published: 2020-06-19 17:54:28

This post is a part of a series, comparing JFrog Artifactory to AWS CodeArtifact. You can find the other parts here: 
{% link https://dev.to/jfrog/jfrog-artifactory-vs-aws-codeartifact-comparison-in-10-ish-parts-521n %}

A simple question: why do you need an artifact repository for?
There are many correct answers to this question, and AWS gives us their take right on the "Getting Started" page of CodeArtifact:
![CodeArtifact Use Cases](https://dev-to-uploads.s3.amazonaws.com/i/8hc9oz1psid3lf20tc9a.png)

Notice anything missing? You knew it, **promotion pipeline**!
Over the years of JFrog experience, it emerged as the most important and critical use case. What I mean by that is the repositories in the tool are used as staging areas for artifacts of different maturity: repository/ies for development, repository/ies for testing, repository/ies for staging, etc:
![Maven repositories in JFrog Arifactory](https://dev-to-uploads.s3.amazonaws.com/i/6a8qb7p6gh0pdhgzmk19.png)

Once you have repositories like `maven-stage-local` and `maven-prod-local`, what do you do next? Well, your CI server will deploy the artifacts into the beginning of your pipeline, and after passing the *quality gates*, your pipeline orchestrator (might be your CI server, but might be another tool, like [JFrog Pipelines](https://jfrog.com/pipelines/), for example) will promote the artifacts from one repository to another:
![Promotion pipeline](https://dev-to-uploads.s3.amazonaws.com/i/9u4zq75vq5fjcknuyde3.png)

How this promotion is done? On a surface – easy. You just move (or copy) the artifacts, and *annotate everything you did* in the metadata.

The first question is move or copy? It's a matter of personal preference. With Artifactory it doesn't matter, really, since the artifacts are deduplicated across the entire platform, so you don't pay for having extra copied (in storage or money). 
In CodeArtifact you will pay for every copy you hold (I didn't find any evidence suggesting otherwise), so you'd prefer moving? Well, you can't, [there is no "move artifact" action](https://docs.aws.amazon.com/codeartifact/latest/ug/copy-package.html).

Well, this is annoying, but at the end of the day it does the job, right? You get your artifacts from one repo (`dev`) to another one (`staging`)? Kinda. What about the metadata? What was promoted? Which set of artifacts? Why? Who moved it? Why? Based on what quality gates? This information is critical both for decision making and for investigation if (when?) shit hits the fan. 

Promoting (moving or copying) single artifacts is okay, but what you really want to promote is a *build* – a set of artifacts and metadata, and you want to generate metadata about the promotion.


So, to summarize, here's what I miss in CodeArtifact repository management at the moment:
* A clean way to implement a pipeline with quality gates (sets of repositories for different maturity).
* A way to atomically promote groups of artifacts and metadata (a build) while leaving the necessary paper trail of metadata.
* Promotion by movement.

Needless to say, you have them all in [JFrog Artifactory](jfrog.com/artifactory).

This post is a part of a series, comparing JFrog Artifactory to AWS CodeArtifact. You can find the other parts here: 
{% link https://dev.to/jfrog/jfrog-artifactory-vs-aws-codeartifact-comparison-in-10-ish-parts-521n %}