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

Refactor deployment tooling #85

Merged
merged 17 commits into from
Nov 5, 2024
Merged

Refactor deployment tooling #85

merged 17 commits into from
Nov 5, 2024

Conversation

alukach
Copy link
Collaborator

@alukach alukach commented Nov 5, 2024

This PR reworks the CICD pipeline to deploy a preview environment whenever a PR is created.

URL to API Gateway is added via comment to PR (see below).

Preview environment should be deleted when PR is closed/merged, but this is hard to test until we merge to main.

@alukach alukach had a problem deploying to Space2Stats API Dev November 5, 2024 19:49 — with GitHub Actions Failure
@alukach alukach had a problem deploying to Space2Stats API Dev November 5, 2024 19:53 — with GitHub Actions Failure
@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 19:57 — with GitHub Actions Inactive
@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 20:10 — with GitHub Actions Inactive
@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 20:21 — with GitHub Actions Inactive
@worldbank worldbank deleted a comment from github-actions bot Nov 5, 2024
@worldbank worldbank deleted a comment from github-actions bot Nov 5, 2024
@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 20:26 — with GitHub Actions Inactive
@worldbank worldbank deleted a comment from github-actions bot Nov 5, 2024
@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 21:36 — with GitHub Actions Inactive
Copy link

github-actions bot commented Nov 5, 2024

PR Deployment Details:
🚀 PR deployed to https://iibrr7xyf1.execute-api.us-east-1.amazonaws.com/

@worldbank worldbank deleted a comment from github-actions bot Nov 5, 2024
@alukach alukach closed this Nov 5, 2024
@alukach alukach reopened this Nov 5, 2024
@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 21:42 — with GitHub Actions Inactive
@alukach alukach requested a review from zacdezgeo November 5, 2024 21:48
@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 22:06 — with GitHub Actions Inactive
Copy link
Collaborator

@zacdezgeo zacdezgeo left a comment

Choose a reason for hiding this comment

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

Awesome work @alukach !

@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 22:52 — with GitHub Actions Inactive
@alukach alukach temporarily deployed to Space2Stats API Dev November 5, 2024 22:54 — with GitHub Actions Inactive
@alukach alukach merged commit 5e933c2 into feature/cd Nov 5, 2024
8 checks passed
@alukach alukach deleted the feature/cd-refactor branch November 5, 2024 22:58
destroy-pr-preview:
if: ${{ github.event.action == 'closed' }}
uses: "./.github/workflows/deploy.yml"

Choose a reason for hiding this comment

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

Should this not be calling destroy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yup, caught in 324c3cb and I am refining in #78. Feel free to have a 👀

alukach added a commit that referenced this pull request Nov 7, 2024
* Update adding staging mechanism

* Add CD pipeline

* Solve f-string matching

* Update event to push on main

* Add dev CD

* Remove npm and node specific jobs

* Update variables

* Update environment

* Update role

* Remove cdk bootstrap

* Add working directory for cdk deployment

* Add cdk requirements

* Update cdk requirements

* Update deployment variables

* Refactor deployment tooling (#85)

* Migrate to reusable workflow

* Add tooling for PR preview URL

* Add runs-on

* Pre-commit

* Refactor triggers

* Bump version

* Add permissions

* Fix working dir

* Fix URL output

* Fix comment find

* Add tooling to tear down PR preview

* Fix commenting

* Fix

* Run tests on all pushes

* Refactor

* Fix

* Expand events

* Fix destroy

* Prevent unnecessary deployments

* Pass in PR number

* Prevent testing on closed PRs

* Refactor

* Mv to workflows

* Fix destroy

* Rework trigger

* Refine

* Rm old needs

* Rework trigger

* Try fix if condition

* Mv deployment trigger back to ci.yml

* Rework triggers

* Rename jobs

* Set concurrency to stage

* Only trigger on pushes to main

---------

Co-authored-by: Anthony Lukach <anthonylukach@gmail.com>
Gabe-Levin pushed a commit that referenced this pull request Nov 11, 2024
* Update adding staging mechanism

* Add CD pipeline

* Solve f-string matching

* Update event to push on main

* Add dev CD

* Remove npm and node specific jobs

* Update variables

* Update environment

* Update role

* Remove cdk bootstrap

* Add working directory for cdk deployment

* Add cdk requirements

* Update cdk requirements

* Update deployment variables

* Refactor deployment tooling (#85)

* Migrate to reusable workflow

* Add tooling for PR preview URL

* Add runs-on

* Pre-commit

* Refactor triggers

* Bump version

* Add permissions

* Fix working dir

* Fix URL output

* Fix comment find

* Add tooling to tear down PR preview

* Fix commenting

* Fix

* Run tests on all pushes

* Refactor

* Fix

* Expand events

* Fix destroy

* Prevent unnecessary deployments

* Pass in PR number

* Prevent testing on closed PRs

* Refactor

* Mv to workflows

* Fix destroy

* Rework trigger

* Refine

* Rm old needs

* Rework trigger

* Try fix if condition

* Mv deployment trigger back to ci.yml

* Rework triggers

* Rename jobs

* Set concurrency to stage

* Only trigger on pushes to main

---------

Co-authored-by: Anthony Lukach <anthonylukach@gmail.com>
Gabe-Levin pushed a commit that referenced this pull request Nov 20, 2024
* Update adding staging mechanism

* Add CD pipeline

* Solve f-string matching

* Update event to push on main

* Add dev CD

* Remove npm and node specific jobs

* Update variables

* Update environment

* Update role

* Remove cdk bootstrap

* Add working directory for cdk deployment

* Add cdk requirements

* Update cdk requirements

* Update deployment variables

* Refactor deployment tooling (#85)

* Migrate to reusable workflow

* Add tooling for PR preview URL

* Add runs-on

* Pre-commit

* Refactor triggers

* Bump version

* Add permissions

* Fix working dir

* Fix URL output

* Fix comment find

* Add tooling to tear down PR preview

* Fix commenting

* Fix

* Run tests on all pushes

* Refactor

* Fix

* Expand events

* Fix destroy

* Prevent unnecessary deployments

* Pass in PR number

* Prevent testing on closed PRs

* Refactor

* Mv to workflows

* Fix destroy

* Rework trigger

* Refine

* Rm old needs

* Rework trigger

* Try fix if condition

* Mv deployment trigger back to ci.yml

* Rework triggers

* Rename jobs

* Set concurrency to stage

* Only trigger on pushes to main

---------

Co-authored-by: Anthony Lukach <anthonylukach@gmail.com>
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