@toptal/davinci-ci 7.2.1-alpha-fx-5090-purge-cloudflare-cache-on-staff-portal-release-e9305443.0 → 7.3.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +20 -0
- package/README.md +13 -0
- package/package.json +3 -4
- package/src/commands/danger.js +15 -19
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 7.3.1
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- [#2332](https://github.com/toptal/davinci/pull/2332) [`52995862`](https://github.com/toptal/davinci/commit/529958625a8bda2e74ef281a5ed0e6bfea109526) Thanks [@augustobmoura](https://github.com/augustobmoura)!
|
8
|
+
|
9
|
+
### davinci-ci danger
|
10
|
+
|
11
|
+
- check danger against `origin/master`
|
12
|
+
|
13
|
+
## 7.3.0
|
14
|
+
|
15
|
+
### Minor Changes
|
16
|
+
|
17
|
+
- [#2366](https://github.com/toptal/davinci/pull/2366) [`738535a0`](https://github.com/toptal/davinci/commit/738535a09ea98a79a4a5a8aabd4b6eebdade3fd1) Thanks [@augustobmoura](https://github.com/augustobmoura)!
|
18
|
+
|
19
|
+
### davinci-ci
|
20
|
+
|
21
|
+
- add variable for HTML CDN cache tags customization
|
22
|
+
|
3
23
|
## 7.2.0
|
4
24
|
|
5
25
|
### Minor Changes
|
package/README.md
CHANGED
@@ -72,6 +72,19 @@ master:
|
|
72
72
|
|
73
73
|
If you have it set as false or if this config is not present in your project `davinci.yaml` file, cypress step will be skipped.
|
74
74
|
|
75
|
+
### Pre-configured davinci docker image
|
76
|
+
|
77
|
+
Davinci CI has a pre-configured docker image recipe, which can be used to build optimized docker images for your frontend applications.
|
78
|
+
The image is present on path `src/configs/docker/Dockerfile.gha-deploy` and have a few build arguments that have to be provided:
|
79
|
+
|
80
|
+
| Build argument | Description | Required |
|
81
|
+
| ------------------------ | -------------------------------------------------------------------------------------------------------- | -------- |
|
82
|
+
| `DIST_FOLDER` | Static build location | Yes |
|
83
|
+
| `ENV_RUNTIME_ENTRYPOINT` | Entrypoint script, davinci has an example file present at `src/configs/docker/env-runtime.entrypoint.sh` | Yes |
|
84
|
+
| `VERSION` | Current release version | Yes |
|
85
|
+
| `NGINX_CONFIG` | Ngninx config, davinci has an example file present at `src/configs/docker/nginx-vhost.conf` | Yes |
|
86
|
+
| `HTML_CDN_CACHE_TAG` | `Cache-Tag` header for HTML documents, used for specific cache purging | No |
|
87
|
+
|
75
88
|
### IDE Tooling
|
76
89
|
|
77
90
|
This package can be used directly in your IDE through these extensions
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@toptal/davinci-ci",
|
3
|
-
"version": "7.
|
3
|
+
"version": "7.3.1",
|
4
4
|
"keywords": [
|
5
5
|
"ci",
|
6
6
|
"docker",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"dependencies": {
|
31
31
|
"@commitlint/cli": "^17.6.7",
|
32
32
|
"@commitlint/config-conventional": "^17.1.0",
|
33
|
-
"@toptal/davinci-cli-shared": "2.3.
|
33
|
+
"@toptal/davinci-cli-shared": "^2.3.9",
|
34
34
|
"chalk": "^4.1.2",
|
35
35
|
"danger": "^11.2.2",
|
36
36
|
"markdown-table": "^2.0.0"
|
@@ -40,6 +40,5 @@
|
|
40
40
|
},
|
41
41
|
"publishConfig": {
|
42
42
|
"access": "public"
|
43
|
-
}
|
44
|
-
"gitHead": "e93054438294181ba916a51fc987462c80960538"
|
43
|
+
}
|
45
44
|
}
|
package/src/commands/danger.js
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import {
|
2
2
|
davinciProjectConfig,
|
3
|
-
runSync,
|
4
3
|
print,
|
5
4
|
convertToCLIParameters,
|
6
5
|
files,
|
6
|
+
$,
|
7
|
+
echo,
|
8
|
+
chalk,
|
7
9
|
} from '@toptal/davinci-cli-shared'
|
8
|
-
import chalk from 'chalk'
|
9
10
|
|
10
|
-
export const dangerCommand = options => {
|
11
|
+
export const dangerCommand = async options => {
|
11
12
|
print.header('Running danger check')
|
12
13
|
const { local, dangerfile, ...rest } = options
|
13
14
|
const dangerfilePath =
|
@@ -18,25 +19,20 @@ export const dangerCommand = options => {
|
|
18
19
|
)
|
19
20
|
|
20
21
|
if (davinciProjectConfig.master.conventionalCommits) {
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
Convention commits are now discouraged, support for it on davinci have been removed. Please use toptal commits instead
|
22
|
+
const UNSUPPORTED = chalk.red('[UNSUPPORTED]')
|
23
|
+
|
24
|
+
echo(`${UNSUPPORTED} Since https://toptal-core.atlassian.net/wiki/x/YQFawQ`)
|
25
|
+
echo(
|
26
|
+
'Convention commits are now discouraged, support for it on davinci have been removed. Please use toptal commits instead.'
|
27
|
+
)
|
26
28
|
process.exit(10)
|
27
29
|
}
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
local ? '--failOnErrors' : undefined,
|
35
|
-
'--dangerfile',
|
36
|
-
`${dangerfilePath}`,
|
37
|
-
...convertToCLIParameters(rest),
|
38
|
-
].filter(Boolean)
|
39
|
-
)
|
31
|
+
const scope = local ? 'local' : 'ci'
|
32
|
+
const extraArgs = convertToCLIParameters(rest)
|
33
|
+
|
34
|
+
// We use --base origin/master in case local master is not up to date, or diverging from remote
|
35
|
+
await $`yarn -s danger ${scope} --dangerfile ${dangerfilePath} --base origin/master ${extraArgs}`
|
40
36
|
}
|
41
37
|
|
42
38
|
export const createDangerCommand = program => {
|