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

ff-prod deploys (and less code) #1580

Closed
wants to merge 20 commits into from
Closed

ff-prod deploys (and less code) #1580

wants to merge 20 commits into from

Conversation

gpmayorga
Copy link
Collaborator

@gpmayorga gpmayorga commented Sep 14, 2023

Description

To deploy a "preview" of the main branch code pointing to the prod endpoints.

Screenshot 2023-09-14 at 00 26 56
https://kflabs.slack.com/archives/C04GNE3JP6Z/p1683906262656619

Given the increasing number of "dual-deploys" I've rearranged things a little to allow to deploy to N environments on a given GH trigger.

Summary:
+ group common workflow code
+ universal "deploy all things" file
+ Less lines of code at the end 😎
+ Dual prod (from main branch) without additional config files
- main branch will now build all artifacts instead of selectively building depending on what folder changes

Check out the new main branch jobs deploying to 3 environments:
https://github.com/centrifuge/apps/actions/workflows/main-branch-deploys.yml
https://github.com/centrifuge/apps/actions/runs/6181041679

This pull request...
Saves some workflow code by grouping it and triggers deployments from main with prod config (app only)

Ah! And here's the preview:
https://app-ff-production.k-f.dev/pools

@gpmayorga gpmayorga force-pushed the ff-prod-deploys branch 2 times, most recently from 385502c to a464229 Compare September 14, 2023 04:39
@centrifuge centrifuge deleted a comment from github-actions bot Sep 14, 2023
@github-actions
Copy link

github-actions bot commented Sep 14, 2023

PR deployed in Google Cloud
URL: https://app-moonbeam-alpha.k-f.dev
Commit #: f09f62a
To access the functions directly check the corresponding deploy Action

@gpmayorga gpmayorga marked this pull request as ready for review September 14, 2023 04:46
@gpmayorga gpmayorga requested a review from jpangelle September 14, 2023 05:11
@gpmayorga gpmayorga enabled auto-merge (squash) September 14, 2023 20:13
@sophialittlejohn
Copy link
Collaborator

It looks like some of the inputs don't resolved properly both in the PR checks and in the PR job

Screenshot 2023-09-14 at 17 53 08

@gpmayorga
Copy link
Collaborator Author

A blip in the matrix, I think we're good

@sophialittlejohn
Copy link
Collaborator

Will they fix themselves when this PR is merged?

@gpmayorga
Copy link
Collaborator Author

Oh wait, I totally missed your point, you mean the ${{ inputs.environment }}
Since I'm setting up the name of the job dynamically, skipped jobs do not get to replace the variable for the actual runtime value.
In cases like ff-prod onboarding and pinning will never be deployed so in every build we will see those ${{

Pushing a fix to try and setup default suffixes when skipped.

@gpmayorga
Copy link
Collaborator Author

Will they fix themselves when this PR is merged?

Ok I tried a few options but it seems that since deploy_all.yml only trigger is being called by another workflow, the job names inside it will always be preceded by the parent workflow calling, so I don't think we really need unique names there.

I've disabled the naming and replaced for much simpler indicative names

function_handler: faucet
concurrency:
group: 'faucet-api@${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
group: 'faucet-api--${{ inputs.deploy_env || github.event.inputs.deploy_env }}@${{ github.event.name }}${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see a double dash faucet-api--$ here, will that cause any problems?

@gpmayorga gpmayorga removed the request for review from jpangelle September 26, 2023 17:47
@gpmayorga gpmayorga disabled auto-merge September 26, 2023 17:50
@gpmayorga gpmayorga mentioned this pull request Sep 27, 2023
@gpmayorga
Copy link
Collaborator Author

Closed in favor of #1598

@gpmayorga gpmayorga closed this Sep 27, 2023
@gpmayorga gpmayorga deleted the ff-prod-deploys branch September 27, 2023 13:42
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