-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathCloudScriptStepTemplate.yml
70 lines (61 loc) · 1.97 KB
/
CloudScriptStepTemplate.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
# STEPS LEVEL TEMPLATE:
# Used to build CloudScript
# Reusable
# Used to "hide" the additional variables specific to this SDK which shouldn't be set from a higher level, or
# shared from a multi-build pipeline like a publish
parameters:
- name: ApiSpecSource
displayName: ApiSpecSource
type: string
default: -apiSpecGitUrl https://raw.githubusercontent.com/PlayFab/API_Specs/master/
- name: CommitMessage
displayName: CommitMessage
type: string
default: Automated build from ADO Pipeline
- name: GitDestBranch
displayName: GitDestBranch
type: string
default: doNotCommit
- name: SdkName
displayName: SdkName
type: string
default: SDKTestingCloudscript
- name: SelfTemplateResource
displayName: SelfTemplateResource
type: string
default: self
steps:
- checkout: JenkinsSdkSetupScripts
clean: true
path: s
- checkout: API_Specs
clean: true
path: s/API_Specs
- checkout: SdkGenerator
clean: true
path: s/SdkGenerator
- checkout: ${{ parameters.SelfTemplateResource }}
clean: true
submodules: true
path: s/sdks/SdkTestingCloudScript
persistCredentials: true
- bash: |
set -e
echo alias the ADO variables into local variables
ApiSpecSource="${{ parameters.ApiSpecSource }}"
CommitMessage="${{ parameters.CommitMessage }}"
GitDestBranch="${{ parameters.GitDestBranch }}"
SdkName="${{ parameters.SdkName }}"
WORKSPACE=$(pwd)
# Hack attempt to get WORKSPACE into a sub-environment
export WORKSPACE="$WORKSPACE"
. "$WORKSPACE/JenkinsSdkSetupScripts/JenkinsScripts/Pipeline/util.sh"
. "$WORKSPACE/JenkinsSdkSetupScripts/JenkinsScripts/Pipeline/testInit.sh"
cd "$WORKSPACE/SDKGenerator/SDKBuildScripts"
. ./shared_build.sh
echo === Build the CloudScript Project ===
Find2019MsBuild || Find2017MsBuild
cd $WORKSPACE/sdks/$SdkName/
"$MSBUILD_EXE" CloudScriptExample.sln
. "$WORKSPACE/SDKGenerator/JenkinsConsoleUtility/JenkinsScripts/gitFinalize.sh"
displayName: 'Build/Test/Report'