Skip to content

Commit dbf758f

Browse files
committed
fix: rush redis cobuild
1 parent e3839da commit dbf758f

Some content is hidden

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

47 files changed

+1793
-72
lines changed

Diff for: .gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ jspm_packages/
6464
*.iml
6565

6666
# Visual Studio Code
67-
.vscode
67+
.vscode/*
68+
!.vscode/settings.json
69+
!.vscode/tasks.json
70+
!.vscode/launch.json
71+
!.vscode/extensions.json
72+
!*.code-workspace
6873

6974
# Rush temporary files
7075
common/deploy/

Diff for: .prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,8 @@ libraries/rush-lib/assets/rush-init/
104104
# These are intentionally invalid files
105105
libraries/heft-config-file/src/test/errorCases/invalidJson/config.json
106106

107+
# common scripts in sandbox repo
108+
build-tests/rush-redis-cobuild-plugin-integration-test/sandbox/repo/common/scripts/
109+
107110
# We'll consider enabling this later; Prettier reformats code blocks, which affects end-user content
108111
*.md

Diff for: .vscode/redis-cobuild.code-workspace

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"folders": [
3+
{
4+
"name": "rush-redis-cobuild-plugin-integration-test",
5+
"path": "../build-tests/rush-redis-cobuild-plugin-integration-test"
6+
},
7+
{
8+
"name": "rush-redis-cobuild-plugin",
9+
"path": "../rush-plugins/rush-redis-cobuild-plugin"
10+
},
11+
{
12+
"name": "rush-lib",
13+
"path": "../libraries/rush-lib"
14+
},
15+
{
16+
"name": ".vscode",
17+
"path": "../.vscode"
18+
}
19+
],
20+
"tasks": {
21+
"version": "2.0.0",
22+
"tasks": [
23+
{
24+
"type": "shell",
25+
"label": "cobuild",
26+
"dependsOrder": "sequence",
27+
"dependsOn": ["update 1", "_cobuild"],
28+
"problemMatcher": []
29+
},
30+
{
31+
"type": "shell",
32+
"label": "_cobuild",
33+
"dependsOn": ["build 1", "build 2"],
34+
"problemMatcher": []
35+
},
36+
{
37+
"type": "shell",
38+
"label": "update",
39+
"command": "node ../../lib/runRush.js update",
40+
"problemMatcher": [],
41+
"presentation": {
42+
"echo": true,
43+
"reveal": "always",
44+
"focus": false,
45+
"panel": "dedicated",
46+
"showReuseMessage": true,
47+
"clear": false
48+
},
49+
"options": {
50+
"cwd": "${workspaceFolder}/sandbox/repo"
51+
}
52+
},
53+
{
54+
"type": "shell",
55+
"label": "build 1",
56+
"command": "node ../../lib/runRush.js --debug cobuild --parallelism 1 --verbose",
57+
"problemMatcher": [],
58+
"options": {
59+
"cwd": "${workspaceFolder}/sandbox/repo"
60+
},
61+
"presentation": {
62+
"echo": true,
63+
"reveal": "always",
64+
"focus": false,
65+
"panel": "dedicated",
66+
"showReuseMessage": true,
67+
"clear": true
68+
},
69+
"group": "build"
70+
},
71+
{
72+
"type": "shell",
73+
"label": "build 2",
74+
"command": "node ../../lib/runRush.js --debug cobuild --parallelism 1 --verbose",
75+
"problemMatcher": [],
76+
"options": {
77+
"cwd": "${workspaceFolder}/sandbox/repo"
78+
},
79+
"presentation": {
80+
"echo": true,
81+
"reveal": "always",
82+
"focus": false,
83+
"panel": "dedicated",
84+
"showReuseMessage": true,
85+
"clear": true
86+
},
87+
"group": "build"
88+
}
89+
]
90+
}
91+
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
redis-data/dump.rdb
1+
redis-data/dump.rdb

Diff for: build-tests/rush-redis-cobuild-plugin-integration-test/docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3.7'
33
services:
44
redis:
55
image: redis:6.2.10-alpine
6-
command: redis-server --save 20 1 --loglevel warning --requirepass redis123
6+
command: redis-server --save "" --loglevel warning --requirepass redis123
77
ports:
88
- '6379:6379'
99
volumes:
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"name": "rush-redis-cobuild-plugin-integration-test",
3-
"description": "Tests connecting to an redis server",
43
"version": "1.0.0",
54
"private": true,
5+
"description": "Tests connecting to an redis server",
66
"license": "MIT",
77
"scripts": {
8-
"build": "heft build --clean",
98
"_phase:build": "heft build --clean",
9+
"build": "heft build --clean",
1010
"test-lock-provider": "node ./lib/testLockProvider.js"
1111
},
1212
"devDependencies": {
13+
"@microsoft/rush-lib": "workspace:*",
1314
"@rushstack/eslint-config": "workspace:*",
1415
"@rushstack/heft": "workspace:*",
15-
"@microsoft/rush-lib": "workspace:*",
16-
"@rushstack/rush-redis-cobuild-plugin": "workspace:*",
1716
"@rushstack/node-core-library": "workspace:*",
18-
"@types/node": "12.20.24",
17+
"@rushstack/rush-redis-cobuild-plugin": "workspace:*",
18+
"@types/http-proxy": "~1.17.8",
19+
"@types/node": "14.18.36",
1920
"eslint": "~8.7.0",
20-
"typescript": "~4.8.4",
2121
"http-proxy": "~1.18.1",
22-
"@types/http-proxy": "~1.17.8"
22+
"typescript": "~4.8.4"
2323
}
2424
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Rush temporary files
2+
common/deploy/
3+
common/temp/
4+
common/autoinstallers/*/.npmrc
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"url": "redis://localhost:6379",
3+
"password": "redis123"
4+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/**
2+
* This configuration file manages Rush's build cache feature.
3+
* More documentation is available on the Rush website: https://rushjs.io
4+
*/
5+
{
6+
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/build-cache.schema.json",
7+
8+
/**
9+
* (Required) EXPERIMENTAL - Set this to true to enable the build cache feature.
10+
*
11+
* See https://rushjs.io/pages/maintainer/build_cache/ for details about this experimental feature.
12+
*/
13+
"buildCacheEnabled": true,
14+
15+
/**
16+
* (Required) Choose where project build outputs will be cached.
17+
*
18+
* Possible values: "local-only", "azure-blob-storage", "amazon-s3"
19+
*/
20+
"cacheProvider": "local-only",
21+
22+
/**
23+
* Setting this property overrides the cache entry ID. If this property is set, it must contain
24+
* a [hash] token.
25+
*
26+
* Other available tokens:
27+
* - [projectName]
28+
* - [projectName:normalize]
29+
* - [phaseName]
30+
* - [phaseName:normalize]
31+
* - [phaseName:trimPrefix]
32+
*/
33+
// "cacheEntryNamePattern": "[projectName:normalize]-[phaseName:normalize]-[hash]"
34+
35+
/**
36+
* Use this configuration with "cacheProvider"="azure-blob-storage"
37+
*/
38+
"azureBlobStorageConfiguration": {
39+
/**
40+
* (Required) The name of the the Azure storage account to use for build cache.
41+
*/
42+
// "storageAccountName": "example",
43+
/**
44+
* (Required) The name of the container in the Azure storage account to use for build cache.
45+
*/
46+
// "storageContainerName": "my-container",
47+
/**
48+
* The Azure environment the storage account exists in. Defaults to AzurePublicCloud.
49+
*
50+
* Possible values: "AzurePublicCloud", "AzureChina", "AzureGermany", "AzureGovernment"
51+
*/
52+
// "azureEnvironment": "AzurePublicCloud",
53+
/**
54+
* An optional prefix for cache item blob names.
55+
*/
56+
// "blobPrefix": "my-prefix",
57+
/**
58+
* If set to true, allow writing to the cache. Defaults to false.
59+
*/
60+
// "isCacheWriteAllowed": true
61+
},
62+
63+
/**
64+
* Use this configuration with "cacheProvider"="amazon-s3"
65+
*/
66+
"amazonS3Configuration": {
67+
/**
68+
* (Required unless s3Endpoint is specified) The name of the bucket to use for build cache.
69+
* Example: "my-bucket"
70+
*/
71+
// "s3Bucket": "my-bucket",
72+
/**
73+
* (Required unless s3Bucket is specified) The Amazon S3 endpoint of the bucket to use for build cache.
74+
* This should not include any path; use the s3Prefix to set the path.
75+
* Examples: "my-bucket.s3.us-east-2.amazonaws.com" or "http://localhost:9000"
76+
*/
77+
// "s3Endpoint": "https://my-bucket.s3.us-east-2.amazonaws.com",
78+
/**
79+
* (Required) The Amazon S3 region of the bucket to use for build cache.
80+
* Example: "us-east-1"
81+
*/
82+
// "s3Region": "us-east-1",
83+
/**
84+
* An optional prefix ("folder") for cache items. It should not start with "/".
85+
*/
86+
// "s3Prefix": "my-prefix",
87+
/**
88+
* If set to true, allow writing to the cache. Defaults to false.
89+
*/
90+
// "isCacheWriteAllowed": true
91+
}
92+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* This configuration file manages Rush's cobuild feature.
3+
* More documentation is available on the Rush website: https://rushjs.io
4+
*/
5+
{
6+
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/cobuild.schema.json",
7+
8+
/**
9+
* (Required) EXPERIMENTAL - Set this to true to enable the cobuild feature.
10+
*/
11+
"cobuildEnabled": true,
12+
13+
/**
14+
* (Required) Choose where cobuild lock will be acquired.
15+
*
16+
* The lock provider is registered by the rush plugins.
17+
* For example, @rushstack/rush-redis-cobuild-plugin registers the "redis" lock provider.
18+
*/
19+
"cobuildLockProvider": "redis"
20+
21+
/**
22+
* Setting this property overrides the cobuild context ID.
23+
*/
24+
// "cobuildContextIdPattern": ""
25+
}

0 commit comments

Comments
 (0)