This repository was archived by the owner on Feb 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 510
Expand file tree
/
Copy pathrelease_pipeline.yml
More file actions
54 lines (41 loc) · 1.71 KB
/
release_pipeline.yml
File metadata and controls
54 lines (41 loc) · 1.71 KB
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
trigger:
- development_branch
pool:
vmImage: ubuntu-latest
stages:
- stage: deploy_to_dev_ws
displayName: 'Deploy to Dev WS'
variables:
- group: var-group-option-2-common
- group: var-group-option-2-dev
- name: BRANCHNAME
value: $[replace(variables['Build.SourceBranch'], 'refs/heads/', '')]
jobs:
- job: Job_Deploy_To_Dev_Ws
steps:
- checkout: self
persistCredentials: true
- task: PowerShell@2
displayName: 'Deploy to Dev Workspace Job'
inputs:
filePath: "./src/option_2/update_from_git_to_ws.ps1"
arguments: '-baseUrl "$(fabricRestApiEndpoint)" -fabricToken $(token) -workspaceName "$(workspaceName)" -capacityId "$(capacityId)" -folder "$(directoryName)"'
pwsh: true
- script: |
git config user.email pipeline@demo.com && git config user.name "Deployment Pipeline"
workingDirectory: $(System.DefaultWorkingDirectory)
displayName: 'Set git user'
- script: |
git checkout -b $(BRANCHNAME)
# make sure we are tracking item-config.json files
git update-index --no-assume-unchanged $(git ls-files | grep "item-config.json" | tr '\n' ' ')
echo 'branch name is $(BRANCHNAME)'
# add all modified item-config.json files to our commit to dev
git add .
echo $(git status -s)
# add commit message and remember to skip ci
git commit -m "This is a commit message [skip ci]"
echo 'step 3 done'
git push --set-upstream origin $(BRANCHNAME)
displayName: 'Push Config to branch'
workingDirectory: $(System.DefaultWorkingDirectory)