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

ci: create gh deployment entry as early as possible #1151

Merged
merged 1 commit into from
Jun 22, 2022
Merged

Conversation

sethidden
Copy link
Contributor

@sethidden sethidden commented Jun 21, 2022

This PR starts a deployment as soon as the deploy to vsf cloud action starts. Previously it only created a deployment after the build - before the curl to vsf cloud / farmer. It's worth mentioning the build->deploy process is a single workflow. We don't upload artifacts in separate steps or anything.

The previous implementation was insufficient as today in the morning there's been some NPM failures which broke the deploy to vsf cloud workflow builds, but the deployments did not appear at all. This led to our QA seeing the tasks in JIRA have the QA status, but not being able to tell if they're already deployed or not.

Now if a situation like this happens again, a deployment will exist and it will show up as failed.

As you can see by the number of deployments below, I've checked if this PR actually works by using the defunct enterprise environment for testing.

@sethidden sethidden temporarily deployed to enterprise June 21, 2022 12:40 Inactive
@sethidden sethidden force-pushed the M2-848 branch 4 times, most recently from f47a278 to e6e50ab Compare June 21, 2022 13:09
@sethidden sethidden temporarily deployed to enterprise June 21, 2022 13:29 Inactive
@sethidden sethidden temporarily deployed to enterprise June 21, 2022 13:32 Inactive
@sethidden sethidden temporarily deployed to enterprise June 21, 2022 13:42 Inactive
@@ -2,42 +2,23 @@
on:
workflow_call:
inputs:
github_environment_name:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

deployment logic was moved out from this file. now it handles only the curl to vsf cloud

@@ -65,54 +112,33 @@ jobs:

LAST_COMMIT: ${{ github.sha }}

deploy-main:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need for multiple deploys blocks now. They were only for assigning the correct environment name to a branch, but now this is handled by the bash script at the top of the file.


- name: Create GitHub deployment
id: deployment
uses: chrnorm/deployment-action@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated deployment-action and deployment-status to v2 from v1 - these are moslty naming convention changes and some alignments with gh api, so this should be a bit more up to date/easier to follow along with

@sethidden sethidden requested a review from inkoguto June 21, 2022 14:03
@sethidden sethidden marked this pull request as ready for review June 21, 2022 14:07
@sethidden sethidden merged commit f2279e9 into develop Jun 22, 2022
@sethidden sethidden deleted the M2-848 branch June 22, 2022 07:09
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.

2 participants