Skip to content

Commit d41f5f7

Browse files
committed
Add Cloudflare Pipelines commands
1 parent 0ffe17d commit d41f5f7

File tree

9 files changed

+1177
-28
lines changed

9 files changed

+1177
-28
lines changed

.changeset/polite-tigers-end.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": minor
3+
---
4+
5+
Add Pipelines commands to Wrangler
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Prerelease Pipelines
2+
on:
3+
push:
4+
branches:
5+
- pipelines
6+
7+
jobs:
8+
release:
9+
if: ${{ github.repository_owner == 'cloudflare' }}
10+
name: Release
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Install Dependencies
20+
uses: ./.github/actions/install-dependencies
21+
22+
- name: Build
23+
run: pnpm run build
24+
25+
- name: Check for errors
26+
run: pnpm run check
27+
env:
28+
NODE_OPTIONS: "--max_old_space_size=8192"
29+
30+
- name: Modify package.json version
31+
run: node .github/version-script.js
32+
33+
- name: Publish to NPM
34+
run: pnpm publish --tag pipelines
35+
env:
36+
NODE_ENV: "production"
37+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
38+
working-directory: packages/wrangler

packages/wrangler/src/__tests__/deploy.test.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -341,20 +341,20 @@ describe("deploy", () => {
341341
await expect(runWrangler("deploy index.js")).resolves.toBeUndefined();
342342

343343
expect(std.out).toMatchInlineSnapshot(`
344-
"Attempting to login via OAuth...
345-
Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256
346-
Successfully logged in.
347-
Total Upload: xx KiB / gzip: xx KiB
348-
Worker Startup Time: 100 ms
349-
Uploaded test-name (TIMINGS)
350-
Published test-name (TIMINGS)
351-
https://test-name.test-sub-domain.workers.dev
352-
Current Deployment ID: Galaxy-Class
353-
Current Version ID: Galaxy-Class
344+
"Attempting to login via OAuth...
345+
Opening a link in your default browser: https://dash.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256
346+
Successfully logged in.
347+
Total Upload: xx KiB / gzip: xx KiB
348+
Worker Startup Time: 100 ms
349+
Uploaded test-name (TIMINGS)
350+
Published test-name (TIMINGS)
351+
https://test-name.test-sub-domain.workers.dev
352+
Current Deployment ID: Galaxy-Class
353+
Current Version ID: Galaxy-Class
354354
355355
356-
Note: Deployment ID has been renamed to Version ID. Deployment ID is present to maintain compatibility with the previous behavior of this command. This output will change in a future version of Wrangler. To learn more visit: https://developers.cloudflare.com/workers/configuration/versions-and-deployments"
357-
`);
356+
Note: Deployment ID has been renamed to Version ID. Deployment ID is present to maintain compatibility with the previous behavior of this command. This output will change in a future version of Wrangler. To learn more visit: https://developers.cloudflare.com/workers/configuration/versions-and-deployments"
357+
`);
358358
expect(std.warn).toMatchInlineSnapshot(`""`);
359359
expect(std.err).toMatchInlineSnapshot(`""`);
360360
});
@@ -386,20 +386,20 @@ describe("deploy", () => {
386386
expect(accessTokenRequest.actual).toEqual(accessTokenRequest.expected);
387387

388388
expect(std.out).toMatchInlineSnapshot(`
389-
"Attempting to login via OAuth...
390-
Opening a link in your default browser: https://dash.staging.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256
391-
Successfully logged in.
392-
Total Upload: xx KiB / gzip: xx KiB
393-
Worker Startup Time: 100 ms
394-
Uploaded test-name (TIMINGS)
395-
Published test-name (TIMINGS)
396-
https://test-name.test-sub-domain.workers.dev
397-
Current Deployment ID: Galaxy-Class
398-
Current Version ID: Galaxy-Class
399-
400-
401-
Note: Deployment ID has been renamed to Version ID. Deployment ID is present to maintain compatibility with the previous behavior of this command. This output will change in a future version of Wrangler. To learn more visit: https://developers.cloudflare.com/workers/configuration/versions-and-deployments"
402-
`);
389+
"Attempting to login via OAuth...
390+
Opening a link in your default browser: https://dash.staging.cloudflare.com/oauth2/auth?response_type=code&client_id=54d11594-84e4-41aa-b438-e81b8fa78ee7&redirect_uri=http%3A%2F%2Flocalhost%3A8976%2Foauth%2Fcallback&scope=account%3Aread%20user%3Aread%20workers%3Awrite%20workers_kv%3Awrite%20workers_routes%3Awrite%20workers_scripts%3Awrite%20workers_tail%3Aread%20d1%3Awrite%20pages%3Awrite%20zone%3Aread%20ssl_certs%3Awrite%20ai%3Awrite%20queues%3Awrite%20pipelines%3Awrite%20offline_access&state=MOCK_STATE_PARAM&code_challenge=MOCK_CODE_CHALLENGE&code_challenge_method=S256
391+
Successfully logged in.
392+
Total Upload: xx KiB / gzip: xx KiB
393+
Worker Startup Time: 100 ms
394+
Uploaded test-name (TIMINGS)
395+
Published test-name (TIMINGS)
396+
https://test-name.test-sub-domain.workers.dev
397+
Current Deployment ID: Galaxy-Class
398+
Current Version ID: Galaxy-Class
399+
400+
401+
Note: Deployment ID has been renamed to Version ID. Deployment ID is present to maintain compatibility with the previous behavior of this command. This output will change in a future version of Wrangler. To learn more visit: https://developers.cloudflare.com/workers/configuration/versions-and-deployments"
402+
`);
403403
expect(std.warn).toMatchInlineSnapshot(`""`);
404404
expect(std.err).toMatchInlineSnapshot(`""`);
405405
});

0 commit comments

Comments
 (0)