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

Deploy to staging #219

Merged
merged 15 commits into from
Jul 10, 2024
Merged

Deploy to staging #219

merged 15 commits into from
Jul 10, 2024

Conversation

github-actions[bot]
Copy link

Automated PR to sync changes from main to staging.

* Upgrade Astro dependencies in doj-demo

* Fix asset issue with Astro's node.js adapter by using trailingSlash: never

* Fix asset issues in doj-demo, and sync up with recent changes in the spotlight app
@github-actions github-actions bot added the autogenerated Created by a project automation label Jun 20, 2024
* Updated the form field focus of edit forms and ui

* Attempt to fix lint errors
Copy link
Author

github-actions bot commented Jun 27, 2024

Terraform plan for tts-10x-atj-staging

Plan: 4 to add, 0 to change, 2 to destroy.
Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+   create
-   destroy

Terraform will perform the following actions:

  # cloudfoundry_app.tts-10x-atj-staging-doj-demo_tts-10x-atj-staging-doj-demo-app_736F8430 will be destroyed
  # (because cloudfoundry_app.tts-10x-atj-staging-doj-demo_tts-10x-atj-staging-doj-demo-app_736F8430 is not in configuration)
-   resource "cloudfoundry_app" "tts-10x-atj-staging-doj-demo_tts-10x-atj-staging-doj-demo-app_736F8430" {
-       disk_quota                      = 4096 -> null
-       docker_image                    = "ghcr.io/gsa-tts/atj-platform/doj-demo:main" -> null
-       enable_ssh                      = true -> null
-       environment                     = (sensitive value) -> null
-       health_check_http_endpoint      = "/" -> null
-       health_check_invocation_timeout = 0 -> null
-       health_check_timeout            = 0 -> null
-       health_check_type               = "http" -> null
-       id                              = "828eaa40-786a-45ce-9a44-3271b1e659d5" -> null
-       id_bg                           = "828eaa40-786a-45ce-9a44-3271b1e659d5" -> null
-       instances                       = 1 -> null
-       labels                          = {} -> null
-       memory                          = 1024 -> null
-       name                            = "tts-10x-atj-staging-doj-demo-app" -> null
-       ports                           = [] -> null
-       space                           = "132fc49b-e29e-40b3-8914-4233e4d4caf4" -> null
-       stopped                         = false -> null
-       strategy                        = "none" -> null
-       timeout                         = 60 -> null
#        (1 unchanged attribute hidden)

-       routes {
-           port  = 0 -> null
-           route = "90846ea2-699e-4416-9037-2c3b739adc90" -> null
        }
    }

  # cloudfoundry_app.tts-10x-atj-staging-server-doj_tts-10x-atj-staging-server-doj-app_E0D2137F will be created
+   resource "cloudfoundry_app" "tts-10x-atj-staging-server-doj_tts-10x-atj-staging-server-doj-app_E0D2137F" {
+       buildpack                       = (known after apply)
+       disk_quota                      = 4096
+       docker_image                    = "ghcr.io/gsa-tts/atj-platform/server-doj:staging"
+       enable_ssh                      = (known after apply)
+       environment                     = (sensitive value)
+       health_check_http_endpoint      = "/"
+       health_check_invocation_timeout = (known after apply)
+       health_check_timeout            = (known after apply)
+       health_check_type               = "http"
+       id                              = (known after apply)
+       id_bg                           = (known after apply)
+       instances                       = 1
+       memory                          = 1024
+       name                            = "tts-10x-atj-staging-server-doj-app"
+       ports                           = (known after apply)
+       space                           = "132fc49b-e29e-40b3-8914-4233e4d4caf4"
+       stack                           = (known after apply)
+       stopped                         = false
+       strategy                        = "none"
+       timeout                         = 60

+       routes {
+           port  = (known after apply)
+           route = (known after apply)
        }
    }

  # cloudfoundry_app.tts-10x-atj-staging-server-kansas_tts-10x-atj-staging-server-kansas-app_0CAEC23C will be created
+   resource "cloudfoundry_app" "tts-10x-atj-staging-server-kansas_tts-10x-atj-staging-server-kansas-app_0CAEC23C" {
+       buildpack                       = (known after apply)
+       disk_quota                      = 4096
+       docker_image                    = "ghcr.io/gsa-tts/atj-platform/server-kansas:staging"
+       enable_ssh                      = (known after apply)
+       environment                     = (sensitive value)
+       health_check_http_endpoint      = "/"
+       health_check_invocation_timeout = (known after apply)
+       health_check_timeout            = (known after apply)
+       health_check_type               = "http"
+       id                              = (known after apply)
+       id_bg                           = (known after apply)
+       instances                       = 1
+       memory                          = 1024
+       name                            = "tts-10x-atj-staging-server-kansas-app"
+       ports                           = (known after apply)
+       space                           = "132fc49b-e29e-40b3-8914-4233e4d4caf4"
+       stack                           = (known after apply)
+       stopped                         = false
+       strategy                        = "none"
+       timeout                         = 60

+       routes {
+           port  = (known after apply)
+           route = (known after apply)
        }
    }

  # cloudfoundry_route.tts-10x-atj-staging-doj-demo-route will be destroyed
  # (because cloudfoundry_route.tts-10x-atj-staging-doj-demo-route is not in configuration)
-   resource "cloudfoundry_route" "tts-10x-atj-staging-doj-demo-route" {
-       domain   = "50ba3f69-cd54-4963-9172-14f3334b479e" -> null
-       endpoint = "tts-10x-atj-staging-doj-demo.app.cloud.gov" -> null
-       hostname = "tts-10x-atj-staging-doj-demo" -> null
-       id       = "90846ea2-699e-4416-9037-2c3b739adc90" -> null
-       space    = "132fc49b-e29e-40b3-8914-4233e4d4caf4" -> null
#        (1 unchanged attribute hidden)
    }

  # cloudfoundry_route.tts-10x-atj-staging-server-doj-route will be created
+   resource "cloudfoundry_route" "tts-10x-atj-staging-server-doj-route" {
+       domain   = "50ba3f69-cd54-4963-9172-14f3334b479e"
+       endpoint = (known after apply)
+       hostname = "tts-10x-atj-staging-server-doj"
+       id       = (known after apply)
+       port     = (known after apply)
+       space    = "132fc49b-e29e-40b3-8914-4233e4d4caf4"
    }

  # cloudfoundry_route.tts-10x-atj-staging-server-kansas-route will be created
+   resource "cloudfoundry_route" "tts-10x-atj-staging-server-kansas-route" {
+       domain   = "50ba3f69-cd54-4963-9172-14f3334b479e"
+       endpoint = (known after apply)
+       hostname = "tts-10x-atj-staging-server-kansas"
+       id       = (known after apply)
+       port     = (known after apply)
+       space    = "132fc49b-e29e-40b3-8914-4233e4d4caf4"
    }

Plan: 4 to add, 0 to change, 2 to destroy.

📝 Plan generated in Post Terraform plan to PR comment #129

natashapl and others added 13 commits June 28, 2024 10:54
* Updated the Drag effect in the Draggable list

* Removed unneeded class names.
…ansas demos (#231)

* Move doj-demo to packages/server, and create an initial app/server-doj application that imports an Express handler from atj/server. TODO: clean up exports, get typings working.

* App handler serving content, but not 100% working

* Server package rendering existing client-side behavior correctly.

* Add a basic test that confirms the home page is rendered on the DOJ custom server.

* Remove debug logging from layout component

* Server dev tasks - build esm

* Make component signatures in spotlight app consistent with updates for @atj/server

* Update docker config for new server-doj and server-kansas apps.

* Add server-kansas app

* Updates to Terraform to accomodate new server package.

* Temporary: Add `astro-library` to deploy, to test TF updates

* Log deployEnv on error

* Temp: hardcode main deploy for testing

* Update deploy script to use arguments for target environment rather that directly pulling the git ref

* Try to reference via context: env.*. I don't think this will work, but found some suggestions that it might.

* Give up trying to globally declare the deploy env, and pass on each users clause

* Build the server entrypoint as part of standard build

* Use injected site title in header rather than hardcoded DOJ name.

* Remove references to "Spotlight" in the form service

* Update a couple build labels

* Add back FormRouter.stories.ts

* Build before testing. Unfortunate, but we need a build to test the demo servers.

* Add symlinks to sample-documents and storybook build

* Work-around typing issue with svg icons

* mask "no explicit any" eslint warning on svg icon hack

* Fix comment in Astro App.Locals declaration

* Explicitness on context arg passing

* Document new structure in READMEs

* Remove debug deploys on astro-library branch.

* More generic example title

* Autoformat
* Add Dockerfile for end-to-end testing

A new Dockerfile, Dockerfile.e2e, has been added to set up end-to-end testing in a docker environment. In this Dockerfile, a container with Node.js and playwright preinstalled is initialized and the project dependencies are installed. The README.md has also been updated to include instructions for building and running this Dockerfile in a docker container.

* Iterate on Dockerfile to expose port and limit what is being run on startup

* Add nginx for static file serving

* Use node for file serving

* match docker container version with playwright version

* update readme

* initialize playwright in project

* Add 'slug' property to Route type in FormManager to facilitate testing

* First real e2e test in project

* Change pattern dropdown to use buttons for a11y and e2e testing reasons.

* add constants for testing purposes

* add debugging info for playwright tests

* make uuid pattern regex reusable and build out the add questions test

* rename file

* remove redundant classname

* Create a test for the add questions and get ready for drag-drop testing once bug is fixed

* Dry out end to end tests with reusable functions.

* Add multi-stage build for e2e test docker image.

* update gh actions to include playwright

* update playwright action

* update playwright tests and docker files to set and use env variable

* update playwright test and URL

* remove build step

* update tests with simple 200 check and add instructions to readme

* Move root route test to MyForms file

* Expose port for testing purposes

* remove local storage testing. ci/cd was eating the localStorage window object

* test run on deploy

* update env var name

* Revert "update env var name"

This reverts commit d7dd8b0.

* Revert "test run on deploy"

This reverts commit 2a4bfb7.

* add husky to project

* add test to precommit

* remove example tests file added by playwright scaffolding command

* move files out of project root and into e2e package

* dry up dockerfile

* reorganize docker and tests for e2e

* move playwright config file and update gitignore

* bump up concurrency

* install new dependencies and correct playwright directory

* update gh action

* remove slug from tests

* remove slug from routes
* debugging issue on main with end-to-end tests
* move end-to-end tests to a workflow that runs on a pull request

* add run statement to set environment config
* move end-to-end tests to a workflow that runs on a pull request

* add run statement to set environment config

* add logging for debugging

* use variable instead of secret in action

* clean up yaml syntax

* update playwright config

* remove dependency for faster run

* update config with debugging info

* restore dependency
* Put "add question" drop-down in the fieldset edit component. Initial attempt at removing items from the edit focus handler. TODO work making it possible to add multiple questions to a fieldset, updating the styling, and adding tests.

* Basic fieldset pattern adding working via downdown picker

* Split different drop-down stylings into separate components

* Use original file name, to make merge easier

* Fix finicky interaction tests that were only failing in jsdom

* Remove what looks like unused white background color; tweak drop-down width to accomodate fieldsets.

* Style "add question" button for fieldsets

* For speed reasons, don't create coverage report on the default "test" script.

* Add an interaction test for the fieldset's "add question" button

* Add "remove question" to fieldset edit ui

* Remove superfluous classnames rename

* Fix generic type in FormSummaryEdit ui

* Upgrade node to latest LTS (20.15.0) and update pnpm-lock.yaml
* Clarify comment

* Bugfix: add missing page pattern data on addPatternToPage

* Update existing addPatternToPage test to confirm that the page title is maintained when patterns are added to a page.
* Updated the focus on the drag list and UI updates

* Add link to nvmrc and NVM repository

* Upgrade to pnpm/action-setup@v4 (v2 is now incompatible with npm - pnpm/action-setup#135)

* Fix test of page title editing

* Fixed the style of the draggable item states

* Fixed the style of the draggable item states

---------

Co-authored-by: Daniel Naab <daniel.naab@gsa.gov>
Co-authored-by: Daniel Naab <dan@crushingpennies.com>
@danielnaab danielnaab merged commit fed86ca into staging Jul 10, 2024
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autogenerated Created by a project automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants