code-mirroring.md 19.9 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
# Setup Mirroring for Gitlab Repositories

__Create Empty Repositories__

Empty repositories need to be created that will be used by a pipeline to mirror gitlab repositories into.

| Repository Name           | Gitlab Location
|---------------------------|---------------------------|
| infra-azure-provisioning  | https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning.git |
| partition                 | https://community.opengroup.org/osdu/platform/system/partition.git |
| entitlements-azure        | https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements-azure.git |
12
| entitlements              | https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements.git |
13
14
15
16
17
18
| legal                     | https://community.opengroup.org/osdu/platform/security-and-compliance/legal.git |
| indexer-queue             | https://community.opengroup.org/osdu/platform/system/indexer-queue.git |
| storage                   | https://community.opengroup.org/osdu/platform/system/storage.git |
| indexer-service           | https://community.opengroup.org/osdu/platform/system/indexer-service.git |
| search-service            | https://community.opengroup.org/osdu/platform/system/search-service.git |
| delivery                  | https://community.opengroup.org/osdu/platform/system/delivery.git       |
19
| file                      | https://community.opengroup.org/osdu/platform/system/file.git      |
20
| unit-service              | https://community.opengroup.org/osdu/platform/system/reference/unit-service.git |
Nicholas Karsky's avatar
Nicholas Karsky committed
21
| crs-catalog-service       | https://community.opengroup.org/osdu/platform/system/reference/crs-catalog-service.git |
Sumra Zafar's avatar
Sumra Zafar committed
22
| crs-conversion-service    | https://community.opengroup.org/osdu/platform/system/reference/crs-conversion-service.git |
harshit aggarwal's avatar
harshit aggarwal committed
23
24
| wks                       | https://community.opengroup.org/osdu/platform/data-flow/enrichment/wks.git |
| register                  | https://community.opengroup.org/osdu/platform/system/register.git |
harshit aggarwal's avatar
harshit aggarwal committed
25
26
| notification              | https://community.opengroup.org/osdu/platform/system/notification.git|
| schema-service            | https://community.opengroup.org/osdu/platform/system/schema-service.git|
27
| ingestion-workflow        | https://community.opengroup.org/osdu/platform/data-flow/ingestion/ingestion-workflow.git |
28
| seismic-store-service     | https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-service.git |
29
| wellbore-domain-services  | https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/wellbore/wellbore-domain-services.git |
Sumra Zafar's avatar
Sumra Zafar committed
30
| ingestion-service         | https://community.opengroup.org/osdu/platform/data-flow/ingestion/ingestion-service.git |
Vivek Ojha's avatar
Vivek Ojha committed
31
| dataset                   | https://community.opengroup.org/osdu/platform/system/dataset.git |
32
| policy                    | https://community.opengroup.org/osdu/platform/security-and-compliance/policy.git |
33
34
35
36
37
38
39
```bash
export ADO_ORGANIZATION=<organization_name>
export ADO_PROJECT=osdu-mvp

az devops configure --defaults organization=https://dev.azure.com/$ADO_ORGANIZATION project=$ADO_PROJECT

# Create required ADO Repositories
40
41
42
SERVICE_LIST="infra-azure-provisioning \
              partition \
              entitlements-azure \
43
              entitlements \
44
45
46
47
48
49
50
51
              legal \
              storage \
              indexer-queue \
              indexer-service \
              search-service \
              delivery \
              file \
              unit-service \
Nicholas Karsky's avatar
Nicholas Karsky committed
52
              crs-catalog-service \
Komal Makkar's avatar
Komal Makkar committed
53
              crs-conversion-service \
harshit aggarwal's avatar
harshit aggarwal committed
54
              wks \
Komal Makkar's avatar
Komal Makkar committed
55
              register \
harshit aggarwal's avatar
harshit aggarwal committed
56
              notification \
57
              schema-service \
58
              ingestion-workflow \
59
              seismic-store-service \
Sumra Zafar's avatar
Sumra Zafar committed
60
              wellbore-domain-services \
61
              ingestion-service \
Vivek Ojha's avatar
Vivek Ojha committed
62
              dataset \
63
              policy"
64

65
66

for SERVICE in $SERVICE_LIST;
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
do
  az repos create --name $SERVICE --organization https://dev.azure.com/${ADO_ORGANIZATION} --project $ADO_PROJECT -ojson
done
```


__Create Variable Group__

This variable group will be used to hold the values of the GitLab Location to be mirrored.  Additionally a Personal Access Token is necessary to allow for git checkin.

Variable Group Name:  `Mirror Variables`

| Variable | Value |
|----------|-------|
| OSDU_INFRASTRUCTURE | https://dev.azure.com/osdu-demo/osdu/_git/osdu-infrastructure |
| INFRA_PROVISIONING_REPO | https://dev.azure.com/osdu-demo/osdu/_git/infra-azure-provisioning |
| PARTITION_REPO | https://dev.azure.com/osdu-demo/osdu/_git/partition |
| ENTITLEMENTS_REPO | https://dev.azure.com/osdu-demo/osdu/_git/entitlements-azure |
85
| ENTITLEMENTS_V2_REPO | https://dev.azure.com/osdu-demo/osdu/_git/entitlements |
86
87
88
89
90
91
| LEGAL_REPO | https://dev.azure.com/osdu-demo/osdu/_git/legal |
| STORAGE_REPO | https://dev.azure.com/osdu-demo/osdu/_git/storage |
| INDEXER_QUEUE_REPO | https://dev.azure.com/osdu-demo/osdu/_git/indexer-queue |
| INDEXER_REPO | https://dev.azure.com/osdu-demo/osdu/_git/indexer-service |
| SEARCH_REPO | https://dev.azure.com/osdu-demo/osdu/_git/search-service |
| DELIVERY_REPO | https://dev.azure.com/osdu-demo/osdu/_git/delivery |
92
| FILE_REPO | https://dev.azure.com/osdu-demo/osdu/_git/file |
93
| UNIT_REPO | https://dev.azure.com/osdu-demo/osdu/_git/unit-service |
Nicholas Karsky's avatar
Nicholas Karsky committed
94
| CRS_CATALOG_REPO | https://dev.azure.com/osdu-demo/osdu/_git/crs-catalog-service |
Sumra Zafar's avatar
Sumra Zafar committed
95
| CRS_CONVERSION_REPO | https://dev.azure.com/osdu-demo/osdu/_git/crs-conversion-service |
harshit aggarwal's avatar
harshit aggarwal committed
96
| WKS_REPO | https://dev.azure.com/osdu-demo/osdu/_git/wks |
harshit aggarwal's avatar
harshit aggarwal committed
97
| REGISTER_REPO | https://dev.azure.com/osdu-demo/osdu/_git/register |
Komal Makkar's avatar
Komal Makkar committed
98
| NOTIFICATION_REPO | https://dev.azure.com/osdu-demo/osdu/_git/notification |
harshit aggarwal's avatar
harshit aggarwal committed
99
| SCHEMA_REPO | https://dev.azure.com/osdu-demo/osdu/_git/schema-service |
100
| INGESTION_WORKFLOW_REPO | https://dev.azure.com/osdu-demo/osdu/_git/ingestion-workflow |
101
| SEISMIC_STORE_SERVICE_REPO | https://dev.azure.com/osdu-demo/osdu/_git/seismic-store-service |
102
| WELLBORE_DOMAIN_SERVICSE_REPO | https://dev.azure.com/osdu-demo/osdu/_git/wellbore-domain-services |
Sumra Zafar's avatar
Sumra Zafar committed
103
| INGESTION_SERVICE_REPO | https://dev.azure.com/osdu-demo/osdu/_git/ingestion-service |
Vivek Ojha's avatar
Vivek Ojha committed
104
| DATASET_REPO | https://dev.azure.com/osdu-demo/osdu/_git/dataset |
105
| POLICY_REPO | https://dev.azure.com/osdu-demo/osdu/_git/policy |
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
| ACCESS_TOKEN | <your_personal_access_token> |


Manually create a Personal Access Token following the [documentation](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page) and add a Variable called `ACCESS_TOKEN` with the value being the PAT created.


```bash
ACCESS_TOKEN=<your_access_token>

az pipelines variable-group create \
  --name "Mirror Variables" \
  --authorize true \
  --variables \
  INFRA_PROVISIONING_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/infra-azure-provisioning \
  PARTITION_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/partition \
  ENTITLEMENTS_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/entitlements-azure \
122
  ENTITLEMENTS_V2_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/entitlements \
123
124
125
126
127
128
  LEGAL_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/legal \
  STORAGE_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/storage \
  INDEXER_QUEUE_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/indexer-queue \
  INDEXER_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/indexer-service \
  SEARCH_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/search-service \
  DELIVERY_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/delivery \
129
  FILE_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/file \
130
  UNIT_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/unit-service \
131
  CRS_CATALOG_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/crs-catalog-service \
Sumra Zafar's avatar
Sumra Zafar committed
132
  CRS_CONVERSION_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/crs-conversion-service \
harshit aggarwal's avatar
harshit aggarwal committed
133
  WKS_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/wks \
harshit aggarwal's avatar
harshit aggarwal committed
134
  REGISTER_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/register \
Komal Makkar's avatar
Komal Makkar committed
135
  NOTIFICATION_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/notification \
136
  SCHEMA_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/schema-service \
137
138
139
  INGESTION_WORKFLOW_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/ingestion-workflow \
  SEISMIC_STORE_SERVICE_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/seismic-store-service \
  WELLBORE_DOMAIN_SERVICSE_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/wellbore-domain-services \
Sumra Zafar's avatar
Sumra Zafar committed
140
  INGESTION_SERVICE_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/ingestion-service \
Vivek Ojha's avatar
Vivek Ojha committed
141
  DATASET_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/dataset \
142
  POLICY_REPO=https://dev.azure.com/${ADO_ORGANIZATION}/$ADO_PROJECT/_git/policy \
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
  ACCESS_TOKEN=$ACCESS_TOKEN \
  -ojson
```


__Create Mirror Pipeline__

Clone the Project Repository `osdu-mvp`, and add the pipeline.


```bash
GIT_SSH_COMMAND="ssh -i ${TF_VAR_gitops_ssh_key_file}"  \
  git clone git@ssh.dev.azure.com:v3/${ADO_ORGANIZATION}/${ADO_PROJECT}/${ADO_PROJECT}

cat > ${ADO_PROJECT}/pipeline.yml << 'EOF'
#  Copyright © Microsoft Corporation
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.


### UNCOMMENT IF YOU WANT A SCHEDULED PULL ####

# schedules:
#   - cron: "*/10 * * * *"
#     displayName: Hourly Pull Schedule
#     branches:
#       include:
#       - master
#     always: true

variables:
  - group: 'Mirror Variables'

jobs:
  - job: mirror_sync
    displayName: 'Pull Repositories'
    steps:

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'infra-azure-provisioning'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning.git'
        destinationGitRepositoryUri: '$(INFRA_PROVISIONING_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'partition'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/partition.git'
        destinationGitRepositoryUri: '$(PARTITION_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'entitlements-azure'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements-azure.git'
        destinationGitRepositoryUri: '$(ENTITLEMENTS_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

212
213
214
215
216
217
218
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'entitlements'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements.git'
        destinationGitRepositoryUri: '$(ENTITLEMENTS_V2_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'legal'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/security-and-compliance/legal.git'
        destinationGitRepositoryUri: '$(LEGAL_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'indexer-queue'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/indexer-queue.git'
        destinationGitRepositoryUri: '$(INDEXER_QUEUE_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'storage'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/storage.git'
        destinationGitRepositoryUri: '$(STORAGE_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'indexer-service'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/indexer-service.git'
        destinationGitRepositoryUri: '$(INDEXER_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'search-service'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/search-service.git'
        destinationGitRepositoryUri: '$(SEARCH_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'delivery'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/delivery.git'
        destinationGitRepositoryUri: '$(DELIVERY_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
260
261
262
263
264
265
266

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'file'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/file.git'
        destinationGitRepositoryUri: '$(FILE_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
Sumra Zafar's avatar
Sumra Zafar committed
267

268
269
270
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'unit-service'
      inputs:
271
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/reference/unit-service.git'
272
273
        destinationGitRepositoryUri: '$(UNIT_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
Nicholas Karsky's avatar
Nicholas Karsky committed
274
275
276
277
278
279
280
    
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'crs-catalog-service'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/reference/crs-catalog-service.git'
        destinationGitRepositoryUri: '$(CRS_CATALOG_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
281

Sumra Zafar's avatar
Sumra Zafar committed
282
283
284
285
286
287
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'crs-conversion-service'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/reference/crs-conversion-service.git'
        destinationGitRepositoryUri: '$(CRS_CONVERSION_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
Komal Makkar's avatar
Komal Makkar committed
288

harshit aggarwal's avatar
harshit aggarwal committed
289
290
291
292
293
294
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'wks'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/data-flow/enrichment/wks.git'
        destinationGitRepositoryUri: '$(WKS_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
harshit aggarwal's avatar
harshit aggarwal committed
295
296
297
298
299
300
301

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'register'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/register.git'
        destinationGitRepositoryUri: '$(REGISTER_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
Komal Makkar's avatar
Komal Makkar committed
302

Komal Makkar's avatar
Komal Makkar committed
303
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
Sudhakar Chundu's avatar
Sudhakar Chundu committed
304
305
306
307
308
      displayName: 'notification'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/notification.git'
        destinationGitRepositoryUri: '$(NOTIFICATION_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
harshit aggarwal's avatar
harshit aggarwal committed
309
310

    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
Sudhakar Chundu's avatar
Sudhakar Chundu committed
311
312
313
314
315
      displayName: 'schema-service'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/schema-service.git'
        destinationGitRepositoryUri: '$(SCHEMA_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
316

317
318
319
320
321
322
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'ingestion-workflow'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/data-flow/ingestion/ingestion-workflow.git'
        destinationGitRepositoryUri: '$(INGESTION_WORKFLOW_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
323

324
325
326
327
328
329
330
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'seismic-store-service'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/seismic-dms-suite/seismic-store-service.git'
        destinationGitRepositoryUri: '$(SEISMIC_STORE_SERVICE_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

331
332
333
334
335
336
337
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'wellbore-domain-services'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/wellbore/wellbore-domain-services.git'
        destinationGitRepositoryUri: '$(WELLBORE_DOMAIN_SERVICSE_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)

Sumra Zafar's avatar
Sumra Zafar committed
338
339
340
341
342
343
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'ingestion-service'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/data-flow/ingestion/ingestion-service.git'
        destinationGitRepositoryUri: '$(INGESTION_SERVICE_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
Vivek Ojha's avatar
Vivek Ojha committed
344
345
346
347
348
349
350
        
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'dataset'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/system/dataset.git'
        destinationGitRepositoryUri: '$(DATASET_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
351
352
353
354
355
356
357
    
    - task: swellaby.mirror-git-repository.mirror-git-repository-vsts-task.mirror-git-repository-vsts-task@1
      displayName: 'policy'
      inputs:
        sourceGitRepositoryUri: 'https://community.opengroup.org/osdu/platform/security-and-compliance/policy.git'
        destinationGitRepositoryUri: '$(POLICY_REPO)'
        destinationGitRepositoryPersonalAccessToken: $(ACCESS_TOKEN)
Sumra Zafar's avatar
Sumra Zafar committed
358

harshit aggarwal's avatar
harshit aggarwal committed
359

360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
EOF

(cd ${ADO_PROJECT}  && git add -A && git commit -m "pipeline" && git push)
rm -rf ${ADO_PROJECT}

# Create and Execute the Pipeline
az pipelines create \
  --name 'gitlab-sync'  \
  --repository $ADO_PROJECT  \
  --branch master  \
  --repository-type tfsgit  \
  --yaml-path /pipeline.yml  \
  -ojson
```

Nicholas Karsky's avatar
Nicholas Karsky committed
375