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

Improve Cloud build auto deployment [PE-177] #78

Merged
merged 3 commits into from
Apr 27, 2022
Merged

Conversation

andrewmackett
Copy link
Member

Description

Jira: PE-177

Amending the Google Cloud Build config to make it trivial to auto deploy changes to any Gr4vy instances we choose.

fi;

substitutions:
_NODE_VERSION: '14'
_ARTIFACT_STORAGE_BUCKET: ''
_CACHE_BUCKET: ''
_GITHUB_TOKEN_LOCATION: ''
_GR4VY_INSTANCES: ''
Copy link
Member

Choose a reason for hiding this comment

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

empty instances?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because this repo is public we leave the definition here empty to avoid advertising the instance names.

The value for this (and other substitutions) is set within the Google Cloud Build trigger that starts running this job.

Copy link
Member

Choose a reason for hiding this comment

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

would it make sense to store it in the repo's settings like a secret env var?

Copy link
Member Author

@andrewmackett andrewmackett Apr 27, 2022

Choose a reason for hiding this comment

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

I'm not sure I understand... Do you mean in the GitHub repo's secrets?
This is a Cloud Build job, so doesn't use any secrets from GitHub.

We could add availableSecrets block to this file to allow the Cloud Build step to collect a value from Google Secret Manager, but the values for the instances would still need to be set in Secret Manager, just as they are in the Cloud Build trigger.

Effectively it would just move the values from Cloud Build to Secret Manager. Given that these values are not really secret, we just don't want to make them very public, and that there is a (small) cost for using Secret Manager, I'm not sure it's a better approach to having the values defined in the trigger.

Copy link
Member

@ipeluffo ipeluffo Apr 27, 2022

Choose a reason for hiding this comment

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

This is a Cloud Build job, so doesn't use any secrets from GitHub.

ignore me, I thought this was a GH action 🙄

Thanks for the explanation

Copy link
Member Author

Choose a reason for hiding this comment

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

No worries.

@douglaseggleton douglaseggleton added the internal Changes only affect the internal API label Apr 27, 2022
@andrewmackett andrewmackett merged commit 3f728b0 into main Apr 27, 2022
@andrewmackett andrewmackett deleted the more-auto-deploy branch April 27, 2022 14:35
@gr4vy-code
Copy link
Collaborator

🚀 PR was released in v2.10.0 🚀

@gr4vy-code gr4vy-code added the released Issue or pull request released label May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Changes only affect the internal API released Issue or pull request released
Development

Successfully merging this pull request may close these issues.

None yet

5 participants