-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathharness-docs.yaml
110 lines (106 loc) · 4.15 KB
/
harness-docs.yaml
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
pipeline:
projectIdentifier: IPA_Release
orgIdentifier: default
tags: {}
stages:
- stage:
name: Build Docs Container
identifier: Build_Docs_Container
description: ""
type: CI
spec:
cloneCodebase: true
execution:
steps:
- step:
type: BuildAndPushDockerRegistry
name: BuildAndPushDockerRegistry_1
identifier: BuildAndPushDockerRegistry_1
spec:
connectorRef: account.harbor
repo: harbor.devops.indico.io/indico/indico-client-csharp
tags:
- <+codebase.commitSha>
dockerfile: readme_docs/docs.Dockerfile
platform:
os: Linux
arch: Amd64
runtime:
type: Cloud
spec: {}
- stage:
name: Build Csharp Docs
identifier: Build_Python_Docs
description: ""
type: Custom
spec:
execution:
steps:
- step:
type: Container
name: PR To Readme
identifier: PR_To_Readme
spec:
connectorRef: account.harbor
image: harbor.devops.indico.io/indico/indico-client-csharp:<+codebase.commitSha>
command: |
cd /indico-client-csharp
chmod +x ./readme_docs/build_docs.sh
./readme_docs/build_docs.sh
cp -r docfx_project/apiV2 $DOCS_PATH
git clone https://user:[email protected]/IndicoDataSolutions/indico-readme.git
cd indico-readme
git config --global user.email "[email protected]"
git config --global user.name "cat-automation"
git checkout -b docs-version-$TAG
mkdir -p markdown
cp -r $DOCS_PATH ./markdown/$LANGUAGE
bash add_frontmatter_yaml.sh
git add ./markdown/$LANGUAGE
git commit -m "a set of doc changes"
git push --set-upstream origin docs-version-$TAG
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/IndicoDataSolutions/indico-readme/pulls \
-d '{"title":"Amazing new feature","body":"Please pull these awesome changes in!","head":"docs-version-'"$TAG"'","base":"main"}'
shell: Bash
infrastructure:
type: KubernetesDirect
spec:
connectorRef: account.Dev_Cluster
namespace: default
resources:
limits:
cpu: "0.5"
memory: 500Mi
annotations: {}
labels: {}
containerSecurityContext:
capabilities:
drop: []
add: []
nodeSelector: {}
reports:
type: JUnit
spec:
paths: []
outputVariables: []
envVariables:
GITHUB_TOKEN: <+secrets.getValue("readmeghpat")>
TAG: <+codebase.commitSha>
LANGUAGE: c-sharp
README_API_KEY: <+secrets.getValue("meghanhickeyreadmepat")>
DOCS_PATH: /harness/c-sharp
timeout: 1m 30s
tags: {}
properties:
ci:
codebase:
connectorRef: account.Indico
repoName: indico-client-csharp
build: <+input>
identifier: Generate_CSharp_Docs
name: Generate CSharp Docs