### Install JQ Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/README.md Installs the JQ command-line JSON processor using Homebrew. ```shell brew install jq ``` -------------------------------- ### Install AWS SAM CLI Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/README.md Installs the AWS SAM CLI using Homebrew. Ensure you have Homebrew installed and tapped into the AWS repository. ```shell brew tap aws/tap brew install aws-sam-cli ``` -------------------------------- ### Run Application Locally with Stubs Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/README.md Runs the application locally using stub services for S3 and Google Sheets. Ensure .env.example is copied to .env and dependencies are installed. ```shell npm ci npm run local ``` -------------------------------- ### Run Acceptance Tests Locally Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/ui-automation-tests/README.md Builds and runs the test container locally. Ensure Docker is installed and prerequisites are met. Environment variables for TEST_ENVIRONMENT and CFN_AdminToolURL must be set. ```bash docker run -t \ -e TEST_ENVIRONMENT='development' \ -e CFN_AdminToolURL='https://admin.development.sign-in.service.gov.uk' \ $(docker build --rm -f tests.Dockerfile --platform linux/amd64 -q .) /run-tests.sh ``` -------------------------------- ### Install Latest Bash Version Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/README.md Installs the latest version of bash using Homebrew. The deployment scripts require at least bash version 5.2.26. ```shell brew install bash ``` -------------------------------- ### Run Application Without Auto-Restart Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/README.md Starts the application without auto-restart. Requires AWS credentials to be configured. ```shell gds aws -- npm start ``` -------------------------------- ### Run Application with Auto-Restart Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/README.md Starts the application in development mode with auto-restart on file changes. This command sets environment variables to use stub values if not explicitly defined. ```shell gds aws -- npm run dev ``` -------------------------------- ### Deploy and Run Admin Tool Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Deploy the admin tool and run it against a deployed backend stack, specifying a prefix. ```shell npm run deploy admin-tool [prefix] ``` -------------------------------- ### Deploy Backend Component Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Use this command to deploy a backend component with the default username prefix. ```shell ./deploy.sh api ``` -------------------------------- ### Deploy Component via npm Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Invoke the deploy script using npm, allowing execution from any directory. Specify component and optional prefix. ```shell npm run deploy [component] [prefix] ``` -------------------------------- ### Deploy Component with SAM Options Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Attach additional options to pass to the SAM build/deploy script when deploying a component. ```shell ./deploy.sh [component] [prefix] --cached --parallel --no-confirm ``` -------------------------------- ### Deploy with npm and Options Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md When invoking with npm, pass additional options to the deploy script using the '--' separator. ```shell npm run deploy [component] [prefix] -- [options] ``` -------------------------------- ### Build SSE Admin Tool Code Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/backend/api/tests/contract-tests/README.md Run this command to build the project before executing tests or publishing contracts. ```bash npm run build ``` -------------------------------- ### Run SSE Admin Tool Consumer Tests Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/backend/api/tests/contract-tests/README.md Execute this command to run the consumer tests. This command runs automatically during a build process. ```bash npm run test ``` -------------------------------- ### Deploy Backend Component with Custom Prefix Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Deploy a backend component with a custom prefix. The prefix must not end with a hyphen. ```shell ./deploy.sh [component] [prefix] ``` -------------------------------- ### Deploy Full Stack via npm Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Deploy the entire stack using npm, specifying a prefix for the deployment. ```shell npm run deploy [prefix] ``` -------------------------------- ### Publish Pact Contract to Broker Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/backend/api/tests/contract-tests/README.md Execute this command to publish the generated contract to the Pact broker. This should be done manually whenever a contract changes. ```bash npm run publish ``` -------------------------------- ### Verify PACT Contract Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/backend/api/tests/contract-tests/README.md Run this command to verify the PACT contract. This is a manual step required after contract changes. ```bash npm run verify ``` -------------------------------- ### Run Local Frontend Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Run the frontend locally against a deployed backend stack. The script retrieves export values from AWS and sets environment variables. ```shell npm run aws [prefix] ``` ```shell npm run remote [prefix] ``` -------------------------------- ### List Deployed Stacks Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md List all deployed stacks associated with a given or default prefix. The '--all' flag can be used to list all stacks. ```shell npm run list [prefix] [--all] ``` -------------------------------- ### Environment Variables for Pact Testing Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/backend/api/tests/contract-tests/README.md Set these environment variables before running Pact tests. Ensure PACT_BROKER_URL, PACT_BROKER_USERNAME, and PACT_BROKER_PASSWORD are replaced with your actual broker credentials. ```bash export PACT_DO_NOT_TRACK=true export PUBLISH_PACT=true export PACT_BROKER_BASE_URL= export PACT_BROKER_USERNAME= export PACT_BROKER_PASSWORD= ``` -------------------------------- ### Delete Specific Component Stacks Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Delete the stacks for specified components within a given prefix. ```shell npm run delete prefix [components...] ``` -------------------------------- ### Delete Stacks Source: https://github.com/govuk-one-login/onboarding-self-service-experience/blob/main/infrastructure/dev/README.md Delete all stacks associated with a given or default prefix. ```shell npm run delete [prefix] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.