-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
176 lines (153 loc) · 6.04 KB
/
azure-pipelines.yml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
trigger: none
pr: none
schedules:
- cron: "0 0 * * *"
always: true
displayName: "Nightly documentation build"
branches:
include:
- master
pool:
vmImage: "windows-latest"
variables:
- group: simplic-deployment
- group: simplic-deployment-dev02
stages:
- stage: GenerateApiDocumentation
jobs:
- job: GenerateApiDocumentation
steps:
- checkout: self
submodules: true
persistCredentials: true
- powershell: |
$url = "https://dev-oxs.simplic.io/devops-api/v1/api/Notify/send?guid=c06a18ff-5cb5-41d1-af5d-c3f7aaf2abd3"
$response = Invoke-RestMethod -Method POST -Uri $url
- task: CmdLine@2
inputs:
script: |
git clone https://$(git_token)@github.com/simplic/documentation -b master D:/documentation
displayName: "Cloning documentation repository"
- task: CmdLine@2
inputs:
script: |
git clone https://$(git_token)@github.com/simplic/simplic.github.io -b master D:/simplic.github.io
displayName: "Cloning simplic.github.io repository"
- task: UsePythonVersion@0
inputs:
versionSpec: "3.x"
architecture: 'x86'
displayName: "Use Python 3.x"
- task: CmdLine@2
inputs:
script: |
git config --global credential.interactive false
git config --system core.longpaths true
git config --global user.email "[email protected]"
git config --global user.name "simplic-bot"
echo 'Installing'
pip install --upgrade pip
python -c "import lxml"
pip install setuptools
pip install wheel
echo 'lxmx installing...'
pip install lxml --use-pep517
echo 'Installing succeced'
displayName: "Installing SetupTools"
- task: CmdLine@2
inputs:
script: |
git config --global credential.interactive false
git config --system core.longpaths true
git config --global user.email "[email protected]"
git config --global user.name "simplic-bot"
choco install docfx -y --version=2.59.4
pip install wheel
cd D:/documentation/dev/build
pip install -r requirements.txt
echo 'installing git'
python3 -m pip install gitpython
pip3 install PyGithub
pip install azure-keyvault-secrets==4.7.0
pip install azure-identity
pip install azure-mgmt-resource
pip install Flask
pip install azure-functions
echo 'git installed'
cd D:/documentation/dev/build/db_drivers
regsvr32 /s dbodbc12simplic_azure.dll
displayName: "Installing prequisites"
- task: CmdLine@2
inputs:
script: |
cd D:/documentation/dev/build
python build.py --git-user $(git_user) --git-token $(git_token) --ftp-user $(ftp_user) --ftp-pass $(ftp_pass)
displayName: "Generating API Documentation"
- task: CmdLine@2
inputs:
script: |
cd D:/documentation/dev/build
print(connection_string)
displayName: "Generating Database Documentation"
- task: CmdLine@2
inputs:
script: |
cd D:/documentation/release_notes/build
python build.py --git-token $(git_token)
displayName: "Generating Release Notes"
- task: CmdLine@2
inputs:
script: |
cd D:/documentation/dev
docfx build
cd D:/documentation/support
docfx build
cd D:/documentation/user
docfx build
cd D:/documentation/release_notes
docfx build
displayName: "Compiling html files"
- task: DeleteFiles@1
inputs:
SourceFolder: "D:/simplic.github.io"
Contents: |
"**"
"!.git/**/*"
displayName: "Cleaning out old simplic.github.io files"
- task: CopyFiles@2
inputs:
SourceFolder: "D:/documentation/_site/dev/_site"
Contents: "**"
TargetFolder: "D:/simplic.github.io/dev"
OverWrite: true
displayName: "Copying dev html files to simplic.github.io (local folder)"
- task: CopyFiles@2
inputs:
SourceFolder: "D:/documentation/_site/support/_site"
Contents: "**"
TargetFolder: "D:/simplic.github.io/support"
OverWrite: true
displayName: "Copying support html files to simplic.github.io (local folder)"
- task: CopyFiles@2
inputs:
SourceFolder: "D:/documentation/_site/user/_site"
Contents: "**"
TargetFolder: "D:/simplic.github.io/user"
OverWrite: true
displayName: "Copying user html files to simplic.github.io (local folder)"
- task: CopyFiles@2
inputs:
SourceFolder: "D:/documentation/_site/release_notes/_site"
Contents: "**"
TargetFolder: "D:/simplic.github.io/release_notes"
OverWrite: true
displayName: "Copying release notes html files to simplic.github.io (local folder)"
- task: CmdLine@2
inputs:
script: |
cd D:/simplic.github.io
git add .
git status
git commit -m "Comitting compiled html files"
git push
displayName: "Test if files were copied and push"