forked from cube-js/cube
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcodefresh.yml
More file actions
114 lines (104 loc) Β· 3.14 KB
/
Copy pathcodefresh.yml
File metadata and controls
114 lines (104 loc) Β· 3.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# this only takes care of CD pipeline
# CI pipeline is taken care from github actions atm
version: "1.0"
# Stages can help you organize your steps in stages
stages:
- "clone"
- "prepare"
- "publish"
steps:
clone:
title: "Cloning repository"
type: "git-clone"
repo: "codefresh-io/cube.js"
revision: "${{CF_BRANCH}}"
git: "cf_github"
stage: "clone"
install_dependencies:
title: 'Installing dependencies'
working_directory: ${{clone}}
image: node:12.22.9
commands:
- ls
- yarn install --frozen-lockfile
stage: "prepare"
build:
title: 'Building'
working_directory: ${{clone}}
image: node:12.22.9
commands:
- ls
- yarn tsc
stage: "prepare"
changed_files:
title: 'Export changed files env for publish condition'
working_directory: ${{clone}}
image: node:12.22.9
commands:
- cf_export CHANGED_FILES=$(git diff "${{CF_BRANCH}}"^ "${{CF_BRANCH}}" --name-only)
stage: "prepare"
deploy_bigquery_driver_to_npm:
title: 'Deploy bigquery-driver'
working_directory: ${{clone}}
type: npm-publish
arguments:
NPM_TOKEN: '${{NPM_TOKEN}}'
DIR: 'cube.js/packages/cubejs-bigquery-driver'
stage: "publish"
when:
condition:
all:
executeForChangedFiles: 'includes("${{CHANGED_FILES}}", "cubejs-bigquery-driver") == true'
masterBranch: '"${{CF_BRANCH}}" == "master"'
deploy_postgres_driver_to_npm:
title: 'Deploy postgres-driver'
working_directory: ${{clone}}
type: npm-publish
arguments:
NPM_TOKEN: '${{NPM_TOKEN}}'
DIR: 'cube.js/packages/cubejs-postgres-driver'
stage: "publish"
when:
condition:
all:
executeForChangedFiles: 'includes("${{CHANGED_FILES}}", "cubejs-postgres-driver") == true'
masterBranch: '"${{CF_BRANCH}}" == "master"'
deploy_server_core_to_npm:
title: 'Deploy server-core'
working_directory: ${{clone}}
type: npm-publish
arguments:
NPM_TOKEN: '${{NPM_TOKEN}}'
DIR: 'cube.js/packages/cubejs-server-core'
stage: "publish"
when:
condition:
all:
executeForChangedFiles: 'includes("${{CHANGED_FILES}}", "cubejs-server-core") == true'
masterBranch: '"${{CF_BRANCH}}" == "master"'
deploy_backend_shared_to_npm:
title: 'Deploy backend-shared'
working_directory: ${{clone}}
type: npm-publish
arguments:
NPM_TOKEN: '${{NPM_TOKEN}}'
DIR: 'cube.js/packages/cubejs-backend-shared'
stage: "publish"
when:
condition:
all:
executeForChangedFiles: 'includes("${{CHANGED_FILES}}", "cubejs-backend-shared") == true'
masterBranch: '"${{CF_BRANCH}}" == "master"'
deploy_query_orchestrator_to_npm:
title: 'Deploy query-orchestrator'
working_directory: ${{clone}}
type: npm-publish
arguments:
NPM_TOKEN: '${{NPM_TOKEN}}'
DIR: 'cube.js/packages/cubejs-query-orchestrator'
stage: "publish"
when:
condition:
all:
executeForChangedFiles: 'includes("${{CHANGED_FILES}}", "cubejs-query-orchestrator") == true'
masterBranch: '"${{CF_BRANCH}}" == "master"'