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

Make circle aws deploy commands idempotent #57

Merged
merged 3 commits into from
Jul 16, 2019
Merged

Make circle aws deploy commands idempotent #57

merged 3 commits into from
Jul 16, 2019

Conversation

Delerme
Copy link
Contributor

@Delerme Delerme commented Jul 15, 2019

merging to master since this is necessary for fuzzy versioning

b1lly
b1lly previously approved these changes Jul 15, 2019
kevincaffrey
kevincaffrey previously approved these changes Jul 16, 2019
Copy link
Contributor

@kevincaffrey kevincaffrey left a comment

Choose a reason for hiding this comment

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

Seems fine, but perhaps could be improved. My 2c provided in the comment inside the review (which you could ignore if you feel like its not worth it)

@@ -33,7 +33,7 @@ commands:
- run:
name: Configure AWS
command: |
mkdir ~/.aws
mkdir -p ~/.aws
cp .circleci/aws_config ~/.aws/config
echo -e $AWS_PROD_PROFILE >> ~/.aws/config
Copy link
Contributor

Choose a reason for hiding this comment

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

won't this now be slightly non-idempotent? I guess it's fine to have "$AWS_PROD_PROFILE" a bunch of times at the end of the aws config?

it does make me wonder if there is some way to refactor the config such that the "configure aws" step just gets run once, rather than trying to make it safe to run a bunch of times. is it even really necessary to use the aws/config thing? can those options just be passed directly to the s3 copy command? eg, adding "--output json" to the arguments, and same for whatever AWS_PROD_PROFILE contains (it could be split up into a few variables as needed?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah yea fixed. I think the config thing protects some config magic but I can revisit later. Also hoping to use redirects in the future instead of this double copy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(actually the file gets overwritten in the cp step previous)

@Delerme Delerme dismissed stale reviews from kevincaffrey and b1lly via df81c44 July 16, 2019 01:12
@Delerme Delerme requested a review from b1lly July 16, 2019 15:28
@Delerme Delerme changed the base branch from master to latest July 16, 2019 15:38
@Delerme Delerme changed the base branch from latest to v0.7.1 July 16, 2019 15:48
@Delerme Delerme merged commit 825e368 into v0.7.1 Jul 16, 2019
@Delerme Delerme deleted the aws branch July 16, 2019 16:17
Delerme pushed a commit that referenced this pull request Jul 16, 2019
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.

None yet

3 participants