Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit 93ddacd

Browse files
Fix script formatting (#204)
* Fix script formatting * Update service-introspection-onboarding.md Co-authored-by: Andre Briggs <andrebriggs@users.noreply.github.com>
1 parent ce939e7 commit 93ddacd

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

docs/service-introspection-onboarding.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,15 @@ Paste the following task towards the end of your release step in the release
168168
pipeline in the Azure DevOps portal:
169169

170170
```yaml
171-
latest_commit=$(git rev-parse --short HEAD) VERSION_TO_DOWNLOAD=$(curl -s
172-
"https://api.github.com/repos/CatalystCode/spk/releases/latest" | grep
173-
"tag_name" | sed -E 's/.*"([^"]+)".*/\1/') echo "Downloading SPK" curl
174-
https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/build.sh
175-
> build.sh chmod +x build.sh . ./build.sh --source-only get_spk_version
176-
download_spk ./spk/spk deployment create -n $(ACCOUNT_NAME) -k $(ACCOUNT_KEY)
177-
-t $(TABLE_NAME) -p $(PARTITION_KEY) --p2 $(Release.ReleaseId) --hld-commit-id
178-
$latest_commit --env $(Release.EnvironmentName) --image-tag $(Build.BuildId)
171+
latest_commit=$(git rev-parse --short HEAD)
172+
VERSION_TO_DOWNLOAD=$(curl -s "https://api.github.com/repos/CatalystCode/spk/releases/latest" | grep "tag_name" | sed -E 's/.*"([^"]+)".*/\1/')
173+
echo "Downloading SPK"
174+
curl https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/build.sh > build.sh
175+
chmod +x build.sh
176+
. ./build.sh --source-only
177+
get_spk_version
178+
download_spk
179+
./spk/spk deployment create -n $(ACCOUNT_NAME) -k $(ACCOUNT_KEY) -t $(TABLE_NAME) -p $(PARTITION_KEY) --p2 $(Release.ReleaseId) --hld-commit-id $latest_commit --env $(Release.EnvironmentName) --image-tag $(Build.BuildId)
179180
```
180181

181182
This task is similar to the one from step 1 but instead passes the information
@@ -190,15 +191,15 @@ Paste the following yaml task towards the end of your image tag release stage in
190191
your multi-stage `azure-pipelines.yml`:
191192

192193
```yaml
193-
latest_commit=$(git rev-parse --short HEAD) tag_name=$(Build.BuildId)
194-
VERSION_TO_DOWNLOAD=$(curl -s
195-
"https://api.github.com/repos/CatalystCode/spk/releases/latest" | grep
196-
"tag_name" | sed -E 's/.*"([^"]+)".*/\1/') echo "Downloading SPK" curl
197-
https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/build.sh
198-
> build.sh chmod +x build.sh . ./build.sh --source-only get_spk_version
199-
download_spk ./spk/spk deployment create -n $(ACCOUNT_NAME) -k $(ACCOUNT_KEY)
200-
-t $(TABLE_NAME) -p $(PARTITION_KEY) --p2 $(Build.BuildId) --hld-commit-id
201-
$latest_commit --env $(Build.SourceBranchName) --image-tag $tag_name
194+
latest_commit=$(git rev-parse --short HEAD)
195+
tag_name=$(Build.BuildId)
196+
echo "Downloading SPK"
197+
curl https://raw.githubusercontent.com/Microsoft/bedrock/master/gitops/azure-devops/build.sh > build.sh
198+
chmod +x build.sh
199+
. ./build.sh --source-only
200+
get_spk_version
201+
download_spk
202+
./spk/spk deployment create -n $(ACCOUNT_NAME) -k $(ACCOUNT_KEY) -t $(TABLE_NAME) -p $(PARTITION_KEY) --p2 $(Build.BuildId) --hld-commit-id $latest_commit --env $(Build.SourceBranchName) --image-tag $tag_name
202203
```
203204

204205
Make sure your variable `tag_name` in this script matches the `tag_name` in the

0 commit comments

Comments
 (0)