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

Migrate CI from TeamCity to GitHub Actions #24

Merged
merged 16 commits into from
Sep 18, 2023

Conversation

samanthagottlieb
Copy link
Contributor

@samanthagottlieb samanthagottlieb commented Sep 13, 2023

What does this change?

This migrates CI from TeamCity to GitHub Actions.

Previously the deprecated node-riffraff-artifact module was used to compress the bundled file into a .zip file and upload files to Riff-Raff. This PR moves to using the Action actions-riffraff instead and does the zipping manually, as this Action does not support compression.

Trello card is here.

Further work

Node version 12 is defined in the .nvmrc, and version 14 is defined in cloudformation as the lambda runtime environment. Node 14 will be deprecated for AWS lambdas on Nov 27, 2023, so this will need to be upgraded, as well as upgrading the application node version.

How to test

This has been tested by comparing the zip files from a previous successful build to a new build.

The size of the zip files are slightly different, but downloading each file and running unzip -l front-press-monitor.zip on the command line confirms that the unzipped index.js files are the same size.

This has also been tested by testing the lambda function in AWS - it ran successfully, as confirmed by these logs:
Screenshot 2023-09-13 at 18 45 55

Rollout

  • Pause the TeamCity build
  • Merge this PR
  • Adjust branch protection rules, requiring the GHA build to pass before merge
  • Ensure all open PRs are rebased against main to ensure their build runs
  • Remove the TeamCity build

UPDATE: I have added the cloudformation.yml template to the files uploaded to riff-raff (previously this would have been done manually) and have configured the riff-raff.yaml file to enable riff-raff to deploy this.

  • since making this change I tested by successfully deploying to PROD (there is no CODE stage), verifying that the cloudformation template has been replaced in AWS, and testing the lambda function in AWS, which runs successfully..

@samanthagottlieb samanthagottlieb marked this pull request as ready for review September 14, 2023 10:00
Copy link
Member

@akash1810 akash1810 left a comment

Choose a reason for hiding this comment

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

Looks great! Added a couple of minor comments.

.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
@samanthagottlieb
Copy link
Contributor Author

UPDATE: I have added the cloudformation.yml template to the files uploaded to riff-raff (previously this would have been done manually) and have configured the riff-raff.yaml file to enable riff-raff to deploy this.

@samanthagottlieb
Copy link
Contributor Author

UPDATE: I have added the cloudformation.yml template to the files uploaded to riff-raff (previously this would have been done manually) and have configured the riff-raff.yaml file to enable riff-raff to deploy this.

Since making this change I tested by successfully deploying to PROD (there is no CODE stage), verifying that the cloudformation template has been replaced in AWS, and testing the lambda function in AWS, which runs successfully.

Copy link
Member

@akash1810 akash1810 left a comment

Choose a reason for hiding this comment

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

Great work!

img

@samanthagottlieb samanthagottlieb merged commit ab2a412 into main Sep 18, 2023
@samanthagottlieb
Copy link
Contributor Author

As part of rollout I've rebased the open dependabot PRs:
Screenshot 2023-09-22 at 17 27 42
-->
Screenshot 2023-09-22 at 17 33 18

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