Note
We recommend installing these dependencies globally:
Install the dependencies:
ni
Go to the infrastructure
package:
cd apps/@wingcloud/infrastructure
Copy the .env.example
file into .env
:
cp .env.example .env
Complete the missing .env
variables (commented variables are optional).
For the APP_SECRET
and the WS_SECRET
environment variables, you can generate a random string with the following command:
openssl rand -hex 32
For the BOT_GITHUB_*
variables, you'll need a GitHub App.
- The Homepage URL doesn't matter
- The Callback URL should be
http://localhost:3900/wrpc/github.callback
- Enable
Request user authorization (OAuth) during installation
- Enable the Webhook. The URL will be updated after the first deployment
- Set a Webhook Secret (e.g.
openssl rand -hex 32
). Remember to specify the webhook secret in the.env
file - Enable SSL verification
- The required permissions are:
- Contents: Read Only
- Issues: Read & Write
- Metadata: Read Only
- Pull Requests: Read & Write
- Administration: Read & Write
- The required events are:
- Pull Request
- Push
Now, run the dev
script:
nr dev
After changing the .projenrc.ts
file, you have to synthesize your project:
projen
Update dependencies from all packages:
pnpm up -r
projen
Check latest versions of dependencies:
pnpm up -riL
projen
Find all AWS environments over here: https://wingcloud.awsapps.com/start
graph TD
A[main] -->|Continuous Deployment| B[staging]
A --> C[Create release branch]
C --> D[Pull Request to production]
D --> E[production]
E -->|Eventually mirrors main| A
The staging environment is deployed continously from the main
branch. Pull requests targeting main
will automatically create a Terraform diff and post it on the pull request itself. Please make sure it's reflecting what you're intending to change before merging to main
.
The production environment is not continously deployed from main
at the moment. Deployments are based on the production
branch.
The production
branch is supposed to eventually mirror main
. This means, make sure that all new features / fixes are going through main
.
- make sure your on the
main
branch and it's up2date git checkout -b release/my-new-release
git push --set-upstream origin release/my-new-release
- create a new pull request, change the base branch to
production
- name the pull request: "release: my new release"
- wait for the Terraform production diff to be commented on the PR!
- make sure the Terraform plan applies cleanly and reflects the intended changes
- Merge with a Merge Commit - don't squash - the pull request into
production