-
Notifications
You must be signed in to change notification settings - Fork 59
/
azure-pipelines.yml
57 lines (52 loc) · 2.41 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
# Cron Schedules have been converted using UTC Time Zone and may need to be updated for your location
trigger: none
schedules:
- cron: 0 9 * * 1,2,3,4,5
branches:
include:
- main
always: true
- cron: 0 15 * * 1,2,3,4,5
branches:
include:
- main
always: true
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
jobs:
- job: Phase_1
displayName: Agent job 1
cancelTimeoutInMinutes: 1
pool:
vmImage: ubuntu-20.04
steps:
- checkout: self
- task: InstallSSHKey@0
inputs:
knownHostsEntry: 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ=='
sshPublicKey: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDj2ZF+ASvxz/qhUTIJ0yO12YsYpcj6FSrOwBrnghFF38XwnW4gVuGt7pIYRQu/jM6O/LE9/aFp1ZZSws/NSxEccLNujpgWtJWG7Nklgc91SK82U/Y2Jbq8Oplgx5LvozCzvmj5BvEwcOeOE19p0AFvoBTD+ymE5WBx9tS0Ha84Yx9GFXf799bgQyQ1xu7x2vDDrtMJFeCT05pUrdPWuNEKXqpgwgdpRZ4/KMdM6WcsaZhXWYq1fzvwmdW+m3rmxa+agVHR9gQjY9Fm3valsiNzx+Yl+fC1pKOH+O/bnanZQGOIe4hAaAgpbmz8qhZAV/kS33sFT9joaVjE/pjjrj8ulXN8+JBISdAYdCc6vj3fF5s5imx2/fGnOL5N8B05oOu63E55BqL/7D9aWA16P8fPQ0PaL290+laIGJZSMDueyCt/vs2bXvIBfQkH2KRQ1DjLfiD/2O9NJ6Pe2LRPsyF0PSz2U+8oKuCHDk2FIC3efOUThEtBo111uoYX1axzNXJsjVdYN+fQQTa46xX5F1fhCdqe5ca0VEHvKQR2LYZqTH3NN93jDeqkahR9ApqQeAXX3cjSJv9kxUOVMhYxR7Z4oTeZDjmecNAIkSujrbdrGRscogpEqzLLyOcNSm25+4QPYn+jkrWOnEglGmVBLt3oIjVXHMG3N4t8l21TEHnVXw== [email protected]'
sshKeySecureFile: 'id_rsa_cxwtool'
- task: CmdLine@2
inputs:
script: |
git config --local user.name "CXWTool Service Account"
git config --local user.email "[email protected]"
git remote add ssh [email protected]:MicrosoftDocs/data-integration-pr.git
git checkout main
git pull ssh main
git checkout live
git pull ssh live
git merge main
CONFLICTS=$(git ls-files -u | wc -l)
if [ "$CONFLICTS" -gt 0 ] ; then
echo "There is a merge conflict. Aborting"
git merge --abort
exit 1
else
echo "Merge OK"
git push ssh live
fi
...