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

New GH Action: CreateOrUpdateStagingDeployCash #1703

Merged
merged 54 commits into from
Mar 12, 2021

Conversation

roryabraham
Copy link
Contributor

@roryabraham roryabraham commented Mar 10, 2021

This issue is currently HELD on https://github.com/Expensify/Expensify/issues/157003

Details

Implements a new Github Action to create or update the StagingDeployCash issue.

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/155140

Tests

  • Create a properly-formatted StagingDeployCashTest StagingDeployCash #1712
  • Close the existing StagingDeployCash
  • Run this action in a test workflow. It should create a new StagingDeployCash. Verify that it is created correctly, looks correct, contains the correct PRList, etc... ✅ IT'S ALIVEEE Deploy Checklist: Expensify.cash 2021-03-11 #1732
  • Re-run the test workflow, and it should add the listed pull requests and deploy blockers to the StagingDeployCash that was created in the previous step.

Tested On

  • Github

@roryabraham roryabraham requested a review from AndrewGable March 10, 2021 19:44
@roryabraham roryabraham requested a review from a team as a code owner March 10, 2021 19:44
@roryabraham roryabraham self-assigned this Mar 10, 2021
@botify botify requested review from TomatoToaster and removed request for a team March 10, 2021 19:44
@@ -299,7 +301,7 @@ class GithubUtils {
deployBlockers = [],
resolvedDeployBlockers = [],
) {
return this.generateVersionComparisonURL(`${GITHUB_OWNER}/${EXPENSIFY_CASH_REPO}`, tag, 'BUILD')
return this.generateVersionComparisonURL(`${GITHUB_OWNER}/${EXPENSIFY_CASH_REPO}`, tag, 'PATCH')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before a StagingDeployCash is finalized, QAd, and deployed to production, we'll bump the PATCH (required for mobile prod deploy). So we'll want a comparison between the current BUILD version (what's currently on staging/included in the StagingDeployCash), and the previous PATCH version (what's currently in production).

# Conflicts:
#	tests/unit/GithubUtilsTest.js
@roryabraham roryabraham changed the title [HOLD #157003] New GH Action: CreateOrUpdateStagingDeployCash New GH Action: CreateOrUpdateStagingDeployCash Mar 11, 2021
@roryabraham
Copy link
Contributor Author

Okay, got pretty far with this. I think right now it's failing to create the action because we're listing applausebot as the assignee, but you can only assign a user to an issue if they have write access to that repo. So we probably just need to give applausebot write access to Expensify.cash.

@roryabraham
Copy link
Contributor Author

Just for ease of record-keeping, this is how this was tested:

- name: Create or Update StagingDeployCash
  uses: Expensify/Expensify.cash/.github/actions/createOrUpdateStagingDeploy@74b813a5ae14aa327319d49ef6d87a21ab6d75db
  with:
      NPM_VERSION: '1.0.2-25'
      GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
      NEW_PULL_REQUESTS: 'https://github.com/Expensify/Expensify.cash/pull/1,https://github.com/Expensify/Expensify.cash/pull/2'
      NEW_DEPLOY_BLOCKERS: 'https://github.com/Expensify/Expensify.cash/issues/123,https://github.com/Expensify/Expensify/issues/12345'

And when the issue was first created, this was the result:

image

As expected, the NEW_PULL_REQUESTS and NEW_DEPLOY_BLOCKERS fields were unused (they are meant for the update use case. Now I'm going to re-run the test workflow, and I'm expecting that #1732 should be updated to include the new PR and a new section with the deploy blocker.

@roryabraham
Copy link
Contributor Author

Okay, had to fix a couple more bugs but now the update part is working too:

#1732

@roryabraham
Copy link
Contributor Author

Okay, this PR is now ready for review 👍

AndrewGable
AndrewGable previously approved these changes Mar 12, 2021
@TomatoToaster TomatoToaster merged commit 08afe10 into master Mar 12, 2021
@TomatoToaster TomatoToaster deleted the Rory-CreateOrUpdateStagingDeployCash branch March 12, 2021 18:12
@github-actions github-actions bot locked and limited conversation to collaborators Mar 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants