Skip to content

Commit

Permalink
Merge branch 'main' into NewBlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
Duncid authored Dec 23, 2024
2 parents ffcfd28 + d7bab3c commit f0a7c33
Show file tree
Hide file tree
Showing 217 changed files with 3,708 additions and 12,660 deletions.
4 changes: 2 additions & 2 deletions .github/configs/europe-west1/.env.edge
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NEXT_PUBLIC_VIZ_URL="https://eu-viz.dust.tt"
NEXT_PUBLIC_VIZ_URL="https://eu.viz.dust.tt"
NEXT_PUBLIC_GA_TRACKING_ID="G-K9HQ2LE04G"
NEXT_PUBLIC_DUST_CLIENT_FACING_URL="https://eu-front-edge.dust.tt"
NEXT_PUBLIC_DUST_CLIENT_FACING_URL="https://eu.front-edge.dust.tt"
4 changes: 2 additions & 2 deletions .github/configs/europe-west1/.env.prod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NEXT_PUBLIC_VIZ_URL="https://eu-viz.dust.tt"
NEXT_PUBLIC_VIZ_URL="https://eu.viz.dust.tt"
NEXT_PUBLIC_GA_TRACKING_ID="G-K9HQ2LE04G"
NEXT_PUBLIC_DUST_CLIENT_FACING_URL="https://eu-front.dust.tt"
NEXT_PUBLIC_DUST_CLIENT_FACING_URL="https://eu.dust.tt"
73 changes: 57 additions & 16 deletions .github/workflows/deploy-connectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: Deploy Connectors
on:
workflow_dispatch:
inputs:
regions:
description: "Regions to deploy to"
required: true
default: "us-central1"
type: choice
options:
- "us-central1"
- "europe-west1"
- "all"
check_deployment_blocked:
description: "Check #deployment locks or force deploy"
required: true
Expand All @@ -18,17 +27,15 @@ concurrency:

env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}
IMAGE_NAME: connectors

jobs:
build-and-deploy:
notify-start:
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/main'

outputs:
thread_ts: ${{ steps.build_message.outputs.thread_ts }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
Expand All @@ -52,22 +59,56 @@ jobs:
channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_BOT_TOKEN }}

create-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
if [ "${{ github.event.inputs.regions }}" = "all" ]; then
echo "matrix=[\"us-central1\",\"europe-west1\"]" >> $GITHUB_OUTPUT
else
echo "matrix=[\"${{ github.event.inputs.regions }}\"]" >> $GITHUB_OUTPUT
fi
build:
needs: [notify-start, create-matrix]
runs-on: ubuntu-latest
strategy:
matrix:
region: ${{ fromJson(needs.create-matrix.outputs.matrix) }}
fail-fast: true

steps:
- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: "Authenticate with Google Cloud"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCLOUD_SA_KEY }}"

- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"

- name: Build the image on Cloud Build
- name: Build image for ${{ matrix.region }}
run: |
chmod +x ./k8s/cloud-build.sh
./k8s/cloud-build.sh \
--image-name=connectors \
--image-name=$IMAGE_NAME \
--dockerfile-path=./connectors/Dockerfile \
--working-dir=./ \
--region=us-central1
--region=${{ matrix.region }}
deploy:
if: github.ref == 'refs/heads/main'
needs: [notify-start, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Generate a token
id: generate-token
Expand All @@ -89,10 +130,10 @@ jobs:
repo: 'dust-infra',
event_type: 'trigger-component-deploy',
client_payload: {
regions: 'us-central1',
regions: '${{ github.event.inputs.regions }}',
component: 'connectors',
image_tag: '${{ steps.short_sha.outputs.short_sha }}',
slack_thread_ts: "${{ steps.build_message.outputs.thread_ts }}",
slack_thread_ts: "${{ needs.notify-start.outputs.thread_ts }}",
slack_channel: '${{ secrets.SLACK_CHANNEL_ID }}'
}
});
Expand All @@ -107,4 +148,4 @@ jobs:
image_tag: ${{ steps.short_sha.outputs.short_sha }}
channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_BOT_TOKEN }}
thread_ts: "${{ steps.build_message.outputs.thread_ts }}"
thread_ts: "${{ needs.notify-start.outputs.thread_ts }}"
70 changes: 54 additions & 16 deletions .github/workflows/deploy-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: Deploy Core
on:
workflow_dispatch:
inputs:
regions:
description: "Regions to deploy to"
required: true
default: "us-central1"
type: choice
options:
- "us-central1"
- "europe-west1"
- "all"
check_deployment_blocked:
description: "Check #deployment locks or force deploy"
required: true
Expand All @@ -18,17 +27,15 @@ concurrency:

env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}
IMAGE_NAME: core

jobs:
build-and-deploy:
notify-start:
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/main'

outputs:
thread_ts: ${{ steps.build_message.outputs.thread_ts }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
Expand All @@ -52,23 +59,54 @@ jobs:
channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_BOT_TOKEN }}

create-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
if [ "${{ github.event.inputs.regions }}" = "all" ]; then
echo "matrix=[\"us-central1\",\"europe-west1\"]" >> $GITHUB_OUTPUT
else
echo "matrix=[\"${{ github.event.inputs.regions }}\"]" >> $GITHUB_OUTPUT
fi
build:
needs: [notify-start, create-matrix]
runs-on: ubuntu-latest
strategy:
matrix:
region: ${{ fromJson(needs.create-matrix.outputs.matrix) }}
fail-fast: true

steps:
- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: "Authenticate with Google Cloud"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCLOUD_SA_KEY }}"

- name: "Set up Cloud SDK"
uses: "google-github-actions/setup-gcloud@v1"

- name: Build the image on Cloud Build
- name: Build image for ${{ matrix.region }}
run: |
chmod +x ./k8s/cloud-build.sh
./k8s/cloud-build.sh \
--image-name=core \
--image-name=$IMAGE_NAME \
--dockerfile-path=./Dockerfile \
--working-dir=./core/ \
--region=us-central1
--region=${{ matrix.region }}
deploy:
needs: [notify-start, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
Expand All @@ -89,10 +127,10 @@ jobs:
repo: 'dust-infra',
event_type: 'trigger-component-deploy',
client_payload: {
regions: 'us-central1',
regions: '${{ github.event.inputs.regions }}',
component: 'core',
image_tag: '${{ steps.short_sha.outputs.short_sha }}',
slack_thread_ts: "${{ steps.build_message.outputs.thread_ts }}",
slack_thread_ts: "${{ needs.notify-start.outputs.thread_ts }}",
slack_channel: '${{ secrets.SLACK_CHANNEL_ID }}'
}
});
Expand All @@ -107,4 +145,4 @@ jobs:
image_tag: ${{ steps.short_sha.outputs.short_sha }}
channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_BOT_TOKEN }}
thread_ts: "${{ steps.build_message.outputs.thread_ts }}"
thread_ts: "${{ needs.notify-start.outputs.thread_ts }}"
67 changes: 54 additions & 13 deletions .github/workflows/deploy-oauth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: Deploy Oauth
on:
workflow_dispatch:
inputs:
regions:
description: "Regions to deploy to"
required: true
default: "us-central1"
type: choice
options:
- "us-central1"
- "europe-west1"
- "all"
check_deployment_blocked:
description: "Check #deployment locks or force deploy"
required: true
Expand All @@ -18,17 +27,15 @@ concurrency:

env:
GCLOUD_PROJECT_ID: ${{ secrets.GCLOUD_PROJECT_ID }}
IMAGE_NAME: oauth

jobs:
build-and-deploy:
notify-start:
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/main'

outputs:
thread_ts: ${{ steps.build_message.outputs.thread_ts }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
Expand All @@ -52,20 +59,54 @@ jobs:
channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_BOT_TOKEN }}

create-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
if [ "${{ github.event.inputs.regions }}" = "all" ]; then
echo "matrix=[\"us-central1\",\"europe-west1\"]" >> $GITHUB_OUTPUT
else
echo "matrix=[\"${{ github.event.inputs.regions }}\"]" >> $GITHUB_OUTPUT
fi
build:
needs: [notify-start, create-matrix]
runs-on: ubuntu-latest
strategy:
matrix:
region: ${{ fromJson(needs.create-matrix.outputs.matrix) }}
fail-fast: true

steps:
- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: "Authenticate with Google Cloud"
uses: "google-github-actions/auth@v1"
with:
credentials_json: "${{ secrets.GCLOUD_SA_KEY }}"

- name: Build the image on Cloud Build
- name: Build image for ${{ matrix.region }}
run: |
chmod +x ./k8s/cloud-build.sh
./k8s/cloud-build.sh \
--image-name=oauth \
--image-name=$IMAGE_NAME \
--dockerfile-path=./oauth.Dockerfile \
--working-dir=./core/ \
--region=us-central1
--region=${{ matrix.region }}
deploy:
needs: [notify-start, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get short sha
id: short_sha
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
Expand All @@ -86,10 +127,10 @@ jobs:
repo: 'dust-infra',
event_type: 'trigger-component-deploy',
client_payload: {
regions: 'us-central1',
regions: '${{ github.event.inputs.regions }}',
component: 'oauth',
image_tag: '${{ steps.short_sha.outputs.short_sha }}',
slack_thread_ts: "${{ steps.build_message.outputs.thread_ts }}",
slack_thread_ts: "${{ needs.notify-start.outputs.thread_ts }}",
slack_channel: '${{ secrets.SLACK_CHANNEL_ID }}'
}
});
Expand All @@ -104,4 +145,4 @@ jobs:
image_tag: ${{ steps.short_sha.outputs.short_sha }}
channel: ${{ secrets.SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_BOT_TOKEN }}
thread_ts: "${{ steps.build_message.outputs.thread_ts }}"
thread_ts: "${{ needs.notify-start.outputs.thread_ts }}"
Loading

0 comments on commit f0a7c33

Please sign in to comment.