mirror of
https://github.com/tloncorp/landscape.git
synced 2024-11-28 12:14:31 +03:00
Merge pull request #66 from tloncorp/hm/debug-deploy
ops: debugging deploy
This commit is contained in:
commit
c83edd10d4
@ -6,32 +6,28 @@
|
||||
repo=$1
|
||||
desk=$2
|
||||
ship=$3
|
||||
zone=$4
|
||||
ref=${5:-.}
|
||||
ref=${4:-.}
|
||||
folder=$ship/$desk
|
||||
|
||||
set -e
|
||||
set -o pipefail
|
||||
cmds=$(mktemp "${TMPDIR:-/tmp/}janeway.XXXXXXXXX")
|
||||
echo '
|
||||
cmdfile=$(mktemp "${TMPDIR:-/tmp/}janeway.XXXXXXXXX")
|
||||
cmds='
|
||||
source_repo=$(mktemp --dry-run /tmp/repo.janeway.XXXXXXXXX)
|
||||
echo $source_repo;
|
||||
git clone git@github.com:'$repo'.git $source_repo
|
||||
urbit_repo=$(mktemp --dry-run /tmp/repo.urbit.XXXXXXXXX)
|
||||
echo $urbit_repo;
|
||||
git clone git@github.com:urbit/urbit.git $urbit_repo
|
||||
cd $source_repo
|
||||
git checkout '$ref'
|
||||
cd /home/urb || return
|
||||
curl -s --data '"'"'{"source":{"dojo":"+hood/mount %'$desk'"},"sink":{"app":"hood"}}'"'"' http://localhost:12321
|
||||
curl -s --data '\''{\"source\":{\"dojo\":\"+hood/mount %'$desk'\"},\"sink\":{\"app\":\"hood\"}}'\'' http://localhost:12321
|
||||
rsync -avL --delete $source_repo/desk/ '$folder'
|
||||
rsync -avL $urbit_repo/pkg/base-dev/ '$folder'
|
||||
curl -s --data '"'"'{"source":{"dojo":"+hood/commit %'$desk'"},"sink":{"app":"hood"}}'"'"' http://localhost:12321
|
||||
curl -s --data '\''{\"source\":{\"dojo\":\"+hood/commit %'$desk'\"},\"sink\":{\"app\":\"hood\"}}'\'' http://localhost:12321
|
||||
rm -rf $source_repo
|
||||
rm -rf $urbit_repo
|
||||
' >> "$cmds"
|
||||
gcloud compute \
|
||||
--project mainnet \
|
||||
ssh \
|
||||
--ssh-flag="-T" \
|
||||
--zone $4 \
|
||||
urb@$ship < "$cmds" &> /dev/null
|
||||
echo "OTA performed for $desk on $ship"
|
||||
'
|
||||
echo "$cmds" >> "$cmdfile"
|
||||
echo "cmdfile=$(echo $cmdfile)" >> $GITHUB_OUTPUT
|
16
.github/workflows/deploy-canary.yml
vendored
16
.github/workflows/deploy-canary.yml
vendored
@ -18,6 +18,18 @@ jobs:
|
||||
credentials_json: '${{ secrets.JANEWAY_SERVICE_KEY }}'
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v1'
|
||||
- name: Deploy
|
||||
- id: deploy-prep
|
||||
name: Prep Deploy Script
|
||||
run:
|
||||
./.github/helpers/deploy.sh tloncorp/landscape landscape binnec-dozzod-marzod us-west1-b ${{ github.event.inputs.tag }}
|
||||
./.github/helpers/deploy.sh tloncorp/landscape garden binnec-dozzod-marzod ${{ github.event.inputs.tag }}
|
||||
- id: 'compute-ssh'
|
||||
name: Deploy
|
||||
uses: 'google-github-actions/ssh-compute@v0'
|
||||
with:
|
||||
project_id: mainnet
|
||||
zone: 'us-west1-b'
|
||||
user: 'urb'
|
||||
instance_name: 'wannec-dozzod-marzod'
|
||||
flags: '--verbosity=info'
|
||||
ssh_private_key: '${{ secrets.TEST_KEY }}'
|
||||
script: ${{ steps.deploy-prep.outputs.cmdfile }}
|
16
.github/workflows/deploy-external.yml
vendored
16
.github/workflows/deploy-external.yml
vendored
@ -18,6 +18,18 @@ jobs:
|
||||
credentials_json: '${{ secrets.JANEWAY_SERVICE_KEY }}'
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v1'
|
||||
- name: Deploy
|
||||
- id: deploy-prep
|
||||
name: Prep Deploy Script
|
||||
run:
|
||||
./.github/helpers/deploy.sh tloncorp/landscape landscape doznec-dozzod-marzod us-west1-b ${{ github.event.inputs.tag }}
|
||||
./.github/helpers/deploy.sh tloncorp/landscape garden doznec-dozzod-marzod ${{ github.event.inputs.tag }}
|
||||
- id: 'compute-ssh'
|
||||
name: Deploy
|
||||
uses: 'google-github-actions/ssh-compute@v0'
|
||||
with:
|
||||
project_id: mainnet
|
||||
zone: 'us-west1-b'
|
||||
user: 'urb'
|
||||
instance_name: 'wannec-dozzod-marzod'
|
||||
flags: '--verbosity=info'
|
||||
ssh_private_key: '${{ secrets.TEST_KEY }}'
|
||||
script: ${{ steps.deploy-prep.outputs.cmdfile }}
|
16
.github/workflows/deploy-internal.yml
vendored
16
.github/workflows/deploy-internal.yml
vendored
@ -18,6 +18,18 @@ jobs:
|
||||
credentials_json: '${{ secrets.JANEWAY_SERVICE_KEY }}'
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v1'
|
||||
- name: Deploy
|
||||
- id: deploy-prep
|
||||
name: Prep Deploy Script
|
||||
run:
|
||||
./.github/helpers/deploy.sh tloncorp/landscape landscape marnec-dozzod-marzod us-west1-b ${{ github.event.inputs.tag }}
|
||||
./.github/helpers/deploy.sh tloncorp/landscape garden marnec-dozzod-marzod ${{ github.event.inputs.tag }}
|
||||
- id: 'compute-ssh'
|
||||
name: Deploy
|
||||
uses: 'google-github-actions/ssh-compute@v0'
|
||||
with:
|
||||
project_id: mainnet
|
||||
zone: 'us-west1-b'
|
||||
user: 'urb'
|
||||
instance_name: 'wannec-dozzod-marzod'
|
||||
flags: '--verbosity=info'
|
||||
ssh_private_key: '${{ secrets.TEST_KEY }}'
|
||||
script: ${{ steps.deploy-prep.outputs.cmdfile }}
|
16
.github/workflows/deploy-live.yml
vendored
16
.github/workflows/deploy-live.yml
vendored
@ -18,6 +18,18 @@ jobs:
|
||||
credentials_json: '${{ secrets.JANEWAY_SERVICE_KEY }}'
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v1'
|
||||
- name: Deploy
|
||||
- id: deploy-prep
|
||||
name: Prep Deploy Script
|
||||
run:
|
||||
./.github/helpers/deploy.sh tloncorp/landscape landscape mister-dister-dozzod-dozzod us-central1-a ${{ github.event.inputs.tag }}
|
||||
./.github/helpers/deploy.sh tloncorp/landscape garden mister-dister-dozzod-dozzod ${{ github.event.inputs.tag }}
|
||||
- id: 'compute-ssh'
|
||||
name: Deploy
|
||||
uses: 'google-github-actions/ssh-compute@v0'
|
||||
with:
|
||||
project_id: mainnet
|
||||
zone: 'us-west1-b'
|
||||
user: 'urb'
|
||||
instance_name: 'wannec-dozzod-marzod'
|
||||
flags: '--verbosity=info'
|
||||
ssh_private_key: '${{ secrets.TEST_KEY }}'
|
||||
script: ${{ steps.deploy-prep.outputs.cmdfile }}
|
19
.github/workflows/deploy.yml
vendored
19
.github/workflows/deploy.yml
vendored
@ -1,6 +1,9 @@
|
||||
name: Deploy Landscape
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
@ -36,6 +39,18 @@ jobs:
|
||||
with:
|
||||
add: '-A'
|
||||
message: 'update glob: ${{ steps.glob.outputs.hash }} [skip actions]'
|
||||
- id: deploy
|
||||
- id: deploy-prep
|
||||
name: Prep Deploy Script
|
||||
run:
|
||||
./.github/helpers/deploy.sh tloncorp/landscape landscape wannec-dozzod-marzod us-west1-b
|
||||
./.github/helpers/prep-deploy.sh tloncorp/landscape garden wannec-dozzod-marzod
|
||||
- id: 'compute-ssh'
|
||||
name: Deploy
|
||||
uses: 'google-github-actions/ssh-compute@v0'
|
||||
with:
|
||||
project_id: mainnet
|
||||
zone: 'us-west1-b'
|
||||
user: 'urb'
|
||||
instance_name: 'wannec-dozzod-marzod'
|
||||
flags: '--verbosity=info'
|
||||
ssh_private_key: '${{ secrets.TEST_KEY }}'
|
||||
script: ${{ steps.deploy-prep.outputs.cmdfile }}
|
Loading…
Reference in New Issue
Block a user