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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ecr-promote cli tool #145

Closed
wants to merge 1 commit into from
Closed

add ecr-promote cli tool #145

wants to merge 1 commit into from

Conversation

segersniels
Copy link

@segersniels segersniels commented May 11, 2018

Review the Contributing Guidelines

Before submitting a pull request, verify it meets all requirements in the Contributing Guidelines.

Describe Why This Is Awesome

Why is this awesome?
Working with a lot of microservices can make it chaotic to promote a lot of image versions between environments.

ecr-promote tries to solve this by letting the user select a CircleCI build through an interactive prompt to promote between these accounts. It currently only supports CircleCI as a CI base, but I'm open to suggestions to add other CI tools.

eg. CircleCI builds staging images and ecr-promote allows the user to easily promote them to a production account (by fuzzy matching git repos to ECR repos).

Example

Configure

# Add environments to your config
$ promote add env staging
? AWS_ACCESS_KEY_ID? dummy
? AWS_SECRET_ACCESS_KEY? dummy
? AWS_DEFAULT_REGION? eu-west-1

$ promote add env production
? AWS_ACCESS_KEY_ID? dummy
? AWS_SECRET_ACCESS_KEY? dummy
? AWS_DEFAULT_REGION? eu-west-1

# Set the default environments for promote to use
# These can also be set by passing the --from and --to flags to the plan command
$ promote default source staging
$ promote default destination production

# Add the github repository
$ promote add repo foo/bar

Promote

# Start a promote filtering through all the added repos on word 'bar'
$ promote plan --filter bar
? Which repo would you like to promote? foo/bar # User selects the correct repository
? Which build? 23 | fixed issue (success) # User selects the desired commit/build that needs to be promoted from staging to production
? Source repository? bar-staging # Fuzzy matched ECR repository to Github repository
? Destination repository? bar-production
ERRO[0005] Tag 0.0.1-23 already exists at destination

--

Like this pull request? Vote for it by adding a 馃憤

@codecov-io
Copy link

Codecov Report

Merging #145 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #145   +/-   ##
=======================================
  Coverage   96.59%   96.59%           
=======================================
  Files           3        3           
  Lines          88       88           
=======================================
  Hits           85       85           
  Misses          3        3

@miketheman
Copy link

The linked GitHub repo is gone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants