Skip to content

Commit 3472009

Browse files
authored
Merge pull request #9387 from continuedev/nate/staging-blueprint
feat: Add staging blueprint (cn-staging) for isolated testing
2 parents e1a9960 + a396ed2 commit 3472009

File tree

3 files changed

+45
-10
lines changed

3 files changed

+45
-10
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "cn-staging",
3+
"dockerfile": "FROM runloop:runloop/universal-ubuntu-24.04-x86_64-dnd",
4+
"system_setup_commands": [
5+
"npm i -g @continuedev/cli@latest",
6+
"sudo apt update",
7+
"printf '#!/bin/sh\\nexit 101\\n' | sudo tee /usr/sbin/policy-rc.d > /dev/null && sudo chmod +x /usr/sbin/policy-rc.d",
8+
"sudo apt install -y --no-install-recommends ripgrep chromium chromium-driver xvfb",
9+
"sudo rm /usr/sbin/policy-rc.d",
10+
"sudo mkdir -p /opt/google/chrome",
11+
"sudo ln -s /usr/bin/chromium /opt/google/chrome/chrome",
12+
"curl -1sLf 'https://artifacts-cli.infisical.com/setup.deb.sh' | sudo -E bash",
13+
"sudo apt-get install -y infisical",
14+
"curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg",
15+
"sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg",
16+
"echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main' | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null",
17+
"sudo apt update",
18+
"sudo apt install -y gh",
19+
"npm cache clean --force"
20+
],
21+
"launch_parameters": {
22+
"launch_commands": [
23+
"export DISPLAY=:99",
24+
"export PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium",
25+
"nohup Xvfb :99 -screen 0 1920x1080x24 > /tmp/xvfb.log 2>&1 &",
26+
"sleep 2"
27+
]
28+
}
29+
}

.github/workflows/runloop-blueprint-template.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
"export DISPLAY=:99",
2424
"export PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium",
2525
"nohup Xvfb :99 -screen 0 1920x1080x24 > /tmp/xvfb.log 2>&1 &",
26-
"sleep 2",
27-
"sudo mkdir -p /home/user",
28-
"for dir in /root/*; do [ -d \"$dir\" ] && [ -d \"$dir/.git\" ] && sudo ln -sf \"$dir\" \"/home/user/$(basename \"$dir\")\"; done"
26+
"sleep 2"
2927
]
3028
}
3129
}

.github/workflows/upload-runloop-blueprint.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,36 @@ on:
77
- main
88
paths:
99
- '.github/workflows/runloop-blueprint-template.json'
10+
- '.github/workflows/runloop-blueprint-staging-template.json'
1011

1112
permissions:
1213
contents: read
1314

1415
jobs:
15-
upload-blueprint:
16-
name: Upload Blueprint to Runloop
16+
upload-blueprints:
17+
name: Upload Blueprints to Runloop
1718
runs-on: ubuntu-latest
1819
# Only run this workflow on the main repository (continuedev/continue)
1920
if: github.repository == 'continuedev/continue'
21+
strategy:
22+
matrix:
23+
include:
24+
- template: runloop-blueprint-template.json
25+
name: cn
26+
- template: runloop-blueprint-staging-template.json
27+
name: cn-staging
2028
steps:
2129
- name: Checkout
2230
uses: actions/checkout@v6
2331

24-
- name: Publish Blueprint to Runloop
32+
- name: Publish ${{ matrix.name }} Blueprint to Runloop
2533
env:
2634
RUNLOOP_API_KEY: ${{ secrets.RUNLOOP_API_KEY }}
2735
run: |
28-
echo "Publishing blueprint 'cn' to Runloop API"
36+
echo "Publishing blueprint '${{ matrix.name }}' to Runloop API"
2937
3038
# Use blueprint configuration from template file
31-
cp .github/workflows/runloop-blueprint-template.json blueprint.json
39+
cp .github/workflows/${{ matrix.template }} blueprint.json
3240
3341
# Publish to Runloop API
3442
response=$(curl -X POST "https://api.runloop.ai/v1/blueprints" \
@@ -42,7 +50,7 @@ jobs:
4250
response_body=$(echo "$response" | head -c -4)
4351
4452
if [[ "$http_code" == "200" ]] || [[ "$http_code" == "201" ]]; then
45-
echo "✅ Successfully published blueprint to Runloop API"
53+
echo "✅ Successfully published blueprint '${{ matrix.name }}' to Runloop API"
4654
echo "Response: $response_body"
4755
4856
# Extract blueprint ID if available
@@ -52,7 +60,7 @@ jobs:
5260
echo "blueprint_id=$blueprint_id" >> $GITHUB_OUTPUT
5361
fi
5462
else
55-
echo "❌ Failed to publish blueprint to Runloop API"
63+
echo "❌ Failed to publish blueprint '${{ matrix.name }}' to Runloop API"
5664
echo "HTTP Code: $http_code"
5765
echo "Response: $response_body"
5866
exit 1

0 commit comments

Comments
 (0)