This repository was archived by the owner on Apr 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcortex-cli.gocd.yaml
More file actions
127 lines (126 loc) · 3.96 KB
/
cortex-cli.gocd.yaml
File metadata and controls
127 lines (126 loc) · 3.96 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
format_version: 10
pipelines:
cortex-cli:
group: fabric6
materials:
cortex-cli:
git: git@github.com:CognitiveScale/cortex-cli.git
branch: develop
stages:
- build:
clean_workspace: yes
jobs:
Build:
elastic_profile_id: gocd-agent-dind-2023
artifacts:
- build:
source: cruise-output/buildReport*.json
- build:
source: devBranchRevision.json
- build:
source: cortex-cli-docs.md
- build:
source: cortex-cli.tgz
tasks:
- script: |
c12e-common.sh dev
- publish:
clean_workspace: true
approval:
type: manual
jobs:
Promote:
elastic_profile_id: gocd-agent-dind-2023
environment_variables:
PROMOTE_BRANCH: "main"
tasks:
- fetch:
stage: build
job: Build
source: devBranchRevision.json
is_file: yes
- script: |
set -eux
COMMIT_SHA="$(cat devBranchRevision.json)"
git fetch
git checkout -b ${PROMOTE_BRANCH} origin/${PROMOTE_BRANCH}
git merge ${COMMIT_SHA} \
--ff-only
git push origin ${PROMOTE_BRANCH}
cortex-cli-master:
group: fabric6-rc
environment_variables:
DOCKER_SECRET_FLAG: "id=npmrc,src=~/.npmrc"
materials:
cortex-cli:
git: git@github.com:CognitiveScale/cortex-cli.git
branch: main
stages:
- build:
clean_workspace: yes
jobs:
Build:
elastic_profile_id: gocd-agent-dind-2023
artifacts:
- build:
source: cortex-cli-docs.md
- build:
source: cortex-cli.tgz
- test:
source: coverage
tabs:
coverage: testoutput/coverage/index.html
tasks:
- script: |
c12e-common.sh master
- publishDocs:
clean_workspace: yes
jobs:
commitDocs:
elastic_profile_id: gocd-agent-dind-2023
tasks:
- fetch:
stage: build
job: Build
source: cortex-cli-docs.md
is_file: yes
- script: |
git clone --branch main --single-branch git@github.com:CognitiveScale/cortex-fabric.git
mv cortex-cli-docs.md cortex-fabric/docs/docs/reference-guides/cortex-cli.md
cd cortex-fabric
git commit -a -m "Publishing New CLI Docs"
git push origin main
cortex-cli-pr:
group: pull-requests
label_template: ${COUNT}
materials:
cortex-cli:
plugin_configuration:
id: github.pr
version: 1
options:
url: git@github.com:CognitiveScale/cortex-cli.git
defaultBranch: develop
stages:
- build:
fetch_materials: true
clean_workspace: true
approval:
type: success
allow_only_on_success: false
jobs:
Build:
elastic_profile_id: gocd-agent-dind-2023
artifacts:
- build:
source: cruise-output/buildReport*.json
- build:
source: devBranchRevision.json
- build:
source: cortex-cli-docs.md
- build:
source: cortex-cli.tgz
timeout: 0
tasks:
- script: |
c12e-common.sh dev