-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathazure-pipelines.yml
131 lines (121 loc) · 5.79 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
name: $(date:yyyyMMdd)$(rev:.r)
variables:
- name: Configuration
value: Release
- name: Ic3PipelineUsage
value: production
- name: system.debug
value: false
- name: TestConfiguration
value: Debug
- group: ServiceTreeLinkGroup
- group: InfoSec-SecurityResults
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: 1esPipelines
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
trigger: none
parameters:
- name: pools
type: object
default:
- name: vsts-mac-131-xcode-142
os: macos
extends:
template: v1/1ES.Unofficial.PipelineTemplate.yml@1esPipelines
parameters:
pool:
name: Azure-Pipelines-1ESPT-ExDShared
image: ubuntu-2204
os: linux
sdl:
sourceAnalysisPool:
image: windows-2022
os: windows
name: Azure-Pipelines-1ESPT-ExDShared
customBuildTags:
- MigrationTooling-skype-SCC-12523-Tool
stages:
- stage: Stage
jobs:
- job: Job_1
displayName: Agent job 1
pool:
os: macos
name: vsts-mac-131-xcode-142
steps:
- checkout: self
clean: true
fetchTags: false
persistCredentials: true
- task: skvso.servicetree-build-tasks.servicetree-link-build-task.servicetree-link-build-task@1
displayName: "ServiceTree: [$(BuildOutputUsage)] "
condition: always()
inputs:
ServiceTreeGateway: ServiceTree Gateway
Service: 5b23174b-8c6d-467d-862d-a3f24958fb74
- task: Bash@3
displayName: Create touchdown custom mapping
inputs:
targetType: inline
script: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
export CUSTOM_MAPPING_FILE="$(System.DefaultWorkingDirectory)/tdbuildCultureMapping.json"
echo '{"cultures":{"ar-SA":"ar-SA.lproj","de-DE":"de-DE.lproj","en-GB":"en-GB.lproj","es-ES":"es-ES.lproj","fi-FI":"fi-FI.lproj","fr-FR":"fr-FR.lproj","he-IL":"he-IL.lproj","it-IT":"it-IT.lproj","ja-JP":"ja-JP.lproj","ko-KR":"ko-KR.lproj","nb-NO":"nb-NO.lproj","nl-NL":"nl-NL.lproj","pl-PL":"pl-PL.lproj","pt-BR":"pt-BR.lproj","ru-RU":"ru-RU.lproj","sv-SE":"sv-SE.lproj","tr-TR":"tr-TR.lproj","zh-CN":"zh-Hans-CN.lproj","zh-TW":"zh-Hant-TW.lproj"}}' > $CUSTOM_MAPPING_FILE
- task: TouchdownBuildTask@4
displayName: Call Touchdown build task for components
condition: ne(variables['commit'], 'true')
inputs:
environment: 'PRODEXT'
teamId: '44988'
authType: 'FederatedIdentity'
FederatedIdentityServiceConnection: 'acs-native-ui'
resourceFilePath: AzureCommunicationUI/sdk/AzureCommunicationUICalling/Sources/Localization/en.lproj/Localizable.strings
outputDirectoryRoot: AzureCommunicationUI/sdk/AzureCommunicationUICalling/Sources/Localization
cultureMappingType: FilePath
cultureMappingFilePath: $(System.DefaultWorkingDirectory)/tdbuildCultureMapping.json
- task: TouchdownBuildTask@4
displayName: Call Touchdown build task for composites and commit changes
condition: eq(variables['commit'], 'true')
inputs:
teamId: "44988"
authType: 'FederatedIdentity'
FederatedIdentityServiceConnection: 'acs-native-ui'
resourceFilePath: AzureCommunicationUI/sdk/AzureCommunicationUICalling/Sources/Localization/en.lproj/Localizable.strings
outputDirectoryRoot: AzureCommunicationUI/sdk/AzureCommunicationUICalling/Sources/Localization
cultureMappingType: FilePath
cultureMappingFilePath: $(System.DefaultWorkingDirectory)/tdbuildCultureMapping.json
- task: Bash@3
displayName: Copy additional language mapping
condition: eq(variables['commit'], 'true')
inputs:
targetType: inline
script: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
echo "git status"
git status
echo "target:source"
ARRAY=("ar:ar-SA" "de:de-DE" "en-US:en" "es:es-ES" "fi:fi-FI" "fr:fr-FR" "he:he-IL" "it:it-IT" "ja:ja-JP" "ko:ko-KR" "nb:nb-NO" "nl:nl-NL" "pl:pl-PL" "pt:pt-BR" "ru:ru-RU" "sv:sv-SE" "tr:tr-TR" "zh:zh-Hans-CN" "zh-Hans:zh-Hans-CN" "zh-Hant:zh-Hant-TW")
LOCALIZATION_PATH="AzureCommunicationUI/sdk/AzureCommunicationUICalling/Sources/Localization"
for mapping in "${ARRAY[@]}" ; do
KEY=${mapping%%:*}
VALUE=${mapping#*:}
cp -R $LOCALIZATION_PATH/$VALUE.lproj/$LOCALIZATION_PATH/$KEY.lproj/
done
echo "git status"
git status
echo "git add"
git add $(system.defaultWorkingDirectory)/$LOCALIZATION_PATH/*
echo "git status"
git status
echo "git commit -m 'add language mapping $(Build.BuildNumber)'"
git commit -m "add language mapping $(Build.BuildNumber)"
echo "git push -u origin HEAD:$(Build.SourceBranch)"
git push -u origin HEAD:$(Build.SourceBranch)