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

feat: aptible config:get cmd #330

Merged
merged 4 commits into from
May 28, 2024
Merged

feat: aptible config:get cmd #330

merged 4 commits into from
May 28, 2024

Conversation

neurosnap
Copy link
Member

@neurosnap neurosnap commented May 16, 2024

https://app.shortcut.com/aptible/story/24724/aptible-config-get-to-retrieve-single-env-variable-value

aptible config:get APTIBLE_DOCKER_IMAGE --app app-ui-xxx-main
registry.io/yyy/xxx-ui:sbx-main

aptible config:get NOT_FOUND --app app-ui-xxx-main

I also added some docker files to make local development easier

@neurosnap neurosnap marked this pull request as ready for review May 20, 2024 20:03
@neurosnap neurosnap removed the request for review from UserNotFound May 21, 2024 18:14
@fancyremarker
Copy link
Member

Tested, and LGTM. Behavior matches heroku config:get with default arguments; with APTIBLE_OUTPUT_FORMAT=json it's a little wonky but tolerable:

$ heroku config:get FOO --app test-frank
{
  "foo": "bar\nbaz\nslash\\"
}
$ bundle exec bin/aptible config:get FOO --app test-frank
{
  "foo": "bar\nbaz\nslash\\"
}
$ APTIBLE_OUTPUT_FORMAT=json bundle exec bin/aptible config:get FOO --app test-frank
[
  "{\n  \"foo\": \"bar\\nbaz\\nslash\\\\\"\n}"
]

Copy link
Member

@fancyremarker fancyremarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TY!

@@ -0,0 +1,10 @@
services:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this (and the Dockerfile)! It is probably worth adding a quick note to the README about how to use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@UserNotFound has a followup PR #331 where we can polish the local docker development -- where we can add a README update, I probably should have made a separate PR for it.

COPY . /app

RUN ./cleanup_bundler
RUN gem install bundler -v '< 2'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI I needed to RUN rm -f Gemfile.lock here to avoid:

 => [5/6] RUN gem install bundler -v '< 2'                                                                        12.0s
 => ERROR [6/6] RUN bundle install                                                                                 0.2s
------                                                                                                                  
 > [6/6] RUN bundle install:
#0 0.227 /usr/local/lib/ruby/2.7.0/rubygems.rb:277:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /app/Gemfile.lock. (Gem::GemNotFoundException)

@neurosnap neurosnap merged commit 349f348 into master May 28, 2024
4 checks passed
@neurosnap neurosnap deleted the sc-24724-config-get branch May 28, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants