Skip to content

Commit

Permalink
Merge pull request #3905 from tloncorp/promote-9-11
Browse files Browse the repository at this point in the history
ops: promote 6.3
  • Loading branch information
arthyn authored Sep 12, 2024
2 parents 397e9c4 + 864888e commit 3e6fce1
Show file tree
Hide file tree
Showing 497 changed files with 25,274 additions and 9,245 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,11 @@ module.exports = {
'react/prop-types': 'off',
'react/display-name': 'warn',
'no-useless-escape': 'warn',
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: '(useAnimatedStyle|useDerivedValue|useAnimatedProps)',
},
],
},
};
4 changes: 2 additions & 2 deletions .github/helpers/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ship=$3
zone=$4
project=$5
ref=${6:-"develop"}
[ "$desk" == "talk" ] && from="talk" || from="desk"
[ "$desk" == "tm-alpha" ] && from="tm-alpha-desk" || from="desk"
folder=$ship/$desk

echo "Deploying $desk from $ref of $repo to $ship in $zone of $project"
Expand Down Expand Up @@ -54,4 +54,4 @@ gcloud compute \
--zone "$zone" --verbosity info \
urb@"$ship" < "$cmdfile"

echo "OTA performed for $desk on $ship"
echo "OTA performed for $desk on $ship"
10 changes: 5 additions & 5 deletions .github/helpers/glob.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#!/usr/bin/env bash

# this script globs a folder of files, then subsequently uploads the
# this script globs a folder of files, then subsequently uploads the
# glob to bootstrap.urbit.org and replaces the hash in the docket file.
# assumes gcloud credentials are loaded and gsutil installed.

# $1: the folder of files to glob
# $2: the location of the docket file

# globber is a prebooted and docked fakezod
curl https://bootstrap.urbit.org/globberv3.tgz | tar xzk
curl https://storage.googleapis.com/bootstrap.urbit.org/globberv4.tar.gz | tar xzk
./zod/.run -d

dojo () {
curl -s --data '{"source":{"dojo":"'"$1"'"},"sink":{"stdout":null}}' http://localhost:12321
curl -s --data '{"source":{"dojo":"'"$1"'"},"sink":{"stdout":null}}' http://localhost:12321
}

hood () {
curl -s --data '{"source":{"dojo":"+hood/'"$1"'"},"sink":{"app":"hood"}}' http://localhost:12321
curl -s --data '{"source":{"dojo":"+hood/'"$1"'"},"sink":{"app":"hood"}}' http://localhost:12321
}

rsync -avL $1 zod/work/glob
Expand All @@ -31,4 +31,4 @@ echo "hash=$(echo $hash)" >> $GITHUB_OUTPUT

hood "exit"
sleep 5s
rm -rf zod
rm -rf zod
82 changes: 80 additions & 2 deletions .github/workflows/deploy-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,33 @@ jobs:
with:
name: 'ui-dist'
path: apps/tlon-web/dist
build-new-frontend:
runs-on: ubuntu-latest
name: 'Build New Frontend'
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
run_install: |
- recursive: true
args: [--frozen-lockfile]
- working-directory: ./apps/tlon-web-new
run:
pnpm build:alpha
- uses: actions/upload-artifact@v3
with:
name: 'ui-dist-new'
path: apps/tlon-web-new/dist
glob:
runs-on: ubuntu-latest
name: 'Make a glob'
needs: build-frontend
needs: build-new-frontend
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -69,6 +92,39 @@ jobs:
BRANCH=${INPUT:-"staging"}
git pull origin $BRANCH --rebase --autostash
git push
glob-new:
runs-on: ubuntu-latest
name: 'Make a glob for new frontend'
needs: build-frontend-new
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- uses: actions/download-artifact@v3
with:
name: 'ui-dist-new'
path: apps/tlon-web-new/dist
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: 'glob'
uses: ./.github/actions/glob
with:
folder: 'apps/tlon-web-new/dist/*'
docket: "tm-alpha-desk/desk.docket-0"
- name: Commit and Push Glob
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
git add desk/desk.docket-0
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ env.tag }}
BRANCH=${INPUT:-"staging"}
git pull origin $BRANCH --rebase --autostash
git push
deploy:
runs-on: ubuntu-latest
name: "Release to ~binnec-dozzod-marnus (canary)"
Expand All @@ -90,4 +146,26 @@ jobs:
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
deploy-new:
runs-on: ubuntu-latest
name: "Release new frontend to ~binnec-dozzod-marnus (canary)"
needs: glob-new
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_SERVICE_KEY }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/tlon-apps tm-alpha binnec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ env.tag }}
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
79 changes: 79 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,28 @@ jobs:
with:
name: "ui-dist"
path: apps/tlon-web/dist
build-new-frontend:
runs-on: ubuntu-latest
name: "Build New Frontend"
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
- name: Setup PNPM
uses: pnpm/action-setup@v3
with:
run_install: |
- recursive: true
args: [--frozen-lockfile]
- working-directory: ./apps/tlon-web-new
run: pnpm build:alpha
- uses: actions/upload-artifact@v3
with:
name: "ui-dist-new"
path: apps/tlon-web-new/dist
glob:
runs-on: ubuntu-latest
name: "Make a glob"
Expand Down Expand Up @@ -72,6 +94,39 @@ jobs:
BRANCH=${INPUT:-"develop"}
git pull origin $BRANCH --rebase --autostash
git push
glob-new:
runs-on: ubuntu-latest
name: "Make a glob for new frontend"
needs: build-new-frontend
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- uses: actions/download-artifact@v3
with:
name: "ui-dist-new"
path: apps/tlon-web/dist
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_SERVICE_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
- name: "glob"
uses: ./.github/actions/glob
with:
folder: "apps/tlon-web-new/dist/*"
docket: "tm-alpha-desk/desk.docket-0"
- name: Commit and Push Glob
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
git add desk/desk.docket-0
git commit -n -m "update new frontend glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
INPUT=${{ env.tag }}
BRANCH=${INPUT:-"develop"}
git pull origin $BRANCH --rebase --autostash
git push
deploy:
runs-on: ubuntu-latest
needs: glob
Expand All @@ -96,3 +151,27 @@ jobs:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
deploy-new:
runs-on: ubuntu-latest
needs: glob-new
name: "Deploy a new frontend glob to ~wannec-dozzod-marnus (devstream)"
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.tag }}
- id: "auth"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCP_SERVICE_KEY }}"
- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"
- id: deploy
name: Deploy
run:
./.github/helpers/deploy.sh tloncorp/tlon-apps tm-alpha
wannec-dozzod-marnus us-central1-a mainnet-tlon-other-2d ${{ env.tag
}}
env:
SSH_SEC_KEY: ${{ secrets.GCP_SSH_SEC_KEY }}
SSH_PUB_KEY: ${{ secrets.GCP_SSH_PUB_KEY }}
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
10 changes: 9 additions & 1 deletion apps/tlon-mobile/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ DEFAULT_SHIP_LOGIN_ACCESS_CODE=
API_URL=https://test.tlon.systems
SHIP_URL_PATTERN=https://{shipId}.test.tlon.systems

# Paths used when dumping / restoring SQLite database via dev menu, relative to
# workspace root.
# Set these to the same value to easily dump and then restore the dump.
# Defaults to `dump.sqlite3` and `restore.sqlite3`.
# Recommended to add these paths to your `.git/info/exclude` file.
SQLITE_DUMP_PATH=dump.db
SQLITE_RESTORE_PATH=$SQLITE_DUMP_PATH

# Other env vars that are set in production, use as needed
# for local testing
POST_HOG_API_KEY=
Expand All @@ -27,4 +35,4 @@ ENABLED_LOGGERS=query,sync
IGNORE_COSMOS=false
TLON_EMPLOYEE_GROUP=
BRANCH_KEY=
BRANCH_DOMAIN=
BRANCH_DOMAIN=
Binary file added apps/tlon-mobile/assets/images/welcome_blocks.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3e6fce1

Please sign in to comment.