Skip to content

Commit 69d0160

Browse files
committed
Merge branch 'main' into jon/lockedfe
2 parents 4ddb62f + 4456d0b commit 69d0160

File tree

249 files changed

+12030
-5351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+12030
-5351
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ provisionersdk/proto/*.go linguist-generated=true
1111
*.tfstate.json linguist-generated=true
1212
*.tfstate.dot linguist-generated=true
1313
*.tfplan.dot linguist-generated=true
14-
14+
site/src/api/typesGenerated.ts linguist-generated=true

.github/actions/setup-node/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ runs:
1313
- name: Setup Node
1414
uses: buildjet/setup-node@v3
1515
with:
16-
node-version: 16.20.1
16+
node-version: 18.17.0
1717
# See https://github.com/actions/setup-node#caching-global-packages-data
1818
cache: "yarn"
1919
cache-dependency-path: ${{ inputs.directory }}/yarn.lock

.github/actions/setup-tf/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ runs:
77
- name: Install Terraform
88
uses: hashicorp/setup-terraform@v2
99
with:
10-
terraform_version: 1.5.2
10+
terraform_version: ~1.5
1111
terraform_wrapper: false

.github/workflows/ci.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ jobs:
203203
needs: changes
204204
if: needs.changes.outputs.offlinedocs-only == 'false' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main'
205205
runs-on: ${{ github.repository_owner == 'coder' && 'buildjet-8vcpu-ubuntu-2204' || 'ubuntu-latest' }}
206-
timeout-minutes: 5
206+
timeout-minutes: 7
207207
steps:
208208
- name: Checkout
209209
uses: actions/checkout@v3
@@ -575,10 +575,17 @@ jobs:
575575
with:
576576
buildScriptName: "storybook:build"
577577
exitOnceUploaded: true
578+
# This will prevent CI from failing when Chromatic detects visual changes
579+
exitZeroOnChanges: true
578580
# Chromatic states its fine to make this token public. See:
579581
# https://www.chromatic.com/docs/github-actions#forked-repositories
580582
projectToken: 695c25b6cb65
581583
workingDir: "./site"
584+
# Prevent excessive build runs on minor version changes
585+
skip: "@(renovate/**|dependabot/**)"
586+
# Run TurboSnap to trace file dependencies to related stories
587+
# and tell chromatic to only take snapshots of relevent stories
588+
onlyChanged: true
582589

583590
# This is a separate step for mainline only that auto accepts and changes
584591
# instead of holding CI up. Since we squash/merge, this is defensive to
@@ -594,9 +601,14 @@ jobs:
594601
STORYBOOK: true
595602
with:
596603
autoAcceptChanges: true
604+
# This will prevent CI from failing when Chromatic detects visual changes
605+
exitZeroOnChanges: true
597606
buildScriptName: "storybook:build"
598607
projectToken: 695c25b6cb65
599608
workingDir: "./site"
609+
# Run TurboSnap to trace file dependencies to related stories
610+
# and tell chromatic to only take snapshots of relevent stories
611+
onlyChanged: true
600612

601613
offlinedocs:
602614
name: offlinedocs

.github/workflows/pr-cleanup.yaml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Cleanup PR
1+
name: Cleanup PR deployment and image
22
on:
33
pull_request:
44
types: [closed]
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
set -euxo pipefail
3939
mkdir -p ~/.kube
40-
echo "${{ secrets.DELIVERYBOT_KUBECONFIG }}" > ~/.kube/config
40+
echo "${{ secrets.PR_DEPLOYMENTS_KUBECONFIG }}" > ~/.kube/config
4141
export KUBECONFIG=~/.kube/config
4242
4343
- name: Delete helm release
@@ -48,3 +48,20 @@ jobs:
4848
- name: "Remove PR namespace"
4949
run: |
5050
kubectl delete namespace "pr${{ steps.pr_number.outputs.PR_NUMBER }}" || echo "namespace not found"
51+
52+
- name: "Remove DNS records"
53+
run: |
54+
set -euxo pipefail
55+
# Get identifier for the record
56+
record_id=$(curl -X GET "https://api.cloudflare.com/client/v4/zones/${{ secrets.PR_DEPLOYMENTS_ZONE_ID }}/dns_records?name=%2A.pr${{ steps.pr_number.outputs.PR_NUMBER }}.${{ secrets.PR_DEPLOYMENTS_DOMAIN }}" \
57+
-H "Authorization: Bearer ${{ secrets.PR_DEPLOYMENTS_CLOUDFLARE_API_TOKEN }}" \
58+
-H "Content-Type:application/json" | jq -r '.result[0].id') || echo "DNS record not found"
59+
60+
echo "::add-mask::$record_id"
61+
62+
# Delete the record
63+
(
64+
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/${{ secrets.PR_DEPLOYMENTS_ZONE_ID }}/dns_records/$record_id" \
65+
-H "Authorization: Bearer ${{ secrets.PR_DEPLOYMENTS_CLOUDFLARE_API_TOKEN }}" \
66+
-H "Content-Type:application/json"
67+
) || echo "DNS record not found"

0 commit comments

Comments
 (0)