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

Commit

Permalink
Get service display name using new command in pipeline (#541)
Browse files Browse the repository at this point in the history
* Part two of getting service display name

* Update README for tests
  • Loading branch information
samiyaakhtar authored Apr 10, 2020
1 parent cc09f24 commit 7ad5325
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
9 changes: 4 additions & 5 deletions src/lib/fileutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,16 @@ export const serviceBuildAndUpdatePipeline = (
},
{
script: generateYamlScript([
`. ./build.sh --source-only`,
`get_spk_version`,
`download_spk`,
`export BUILD_REPO_NAME=${BUILD_REPO_NAME(serviceName)}`,
`tag_name="$BUILD_REPO_NAME:${IMAGE_TAG}"`,
`commitId=$(Build.SourceVersion)`,
`commitId=$(echo "\${commitId:0:7}")`,
`service=$(Build.Repository.Name)`,
`service=\${service##*/}`,
`service=$(./spk/spk service get-display-name -p ${relativeServiceForDockerfile})`,
`url=$(git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1)`,
`repourl=\${url##*@}`,
`. ./build.sh --source-only`,
`get_spk_version`,
`download_spk`,
`./spk/spk deployment create -n $(INTROSPECTION_ACCOUNT_NAME) -k $(INTROSPECTION_ACCOUNT_KEY) -t $(INTROSPECTION_TABLE_NAME) -p $(INTROSPECTION_PARTITION_KEY) --p1 $(Build.BuildId) --image-tag $tag_name --commit-id $commitId --service $service --repository $repourl`,
]),
displayName:
Expand Down
9 changes: 4 additions & 5 deletions src/test/mockFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,16 @@ export const createTestServiceBuildAndUpdatePipelineYaml = (
},
{
script: generateYamlScript([
`. ./build.sh --source-only`,
`get_spk_version`,
`download_spk`,
`export BUILD_REPO_NAME=${BUILD_REPO_NAME(serviceName)}`,
`tag_name="$BUILD_REPO_NAME:${IMAGE_TAG}"`,
`commitId=$(Build.SourceVersion)`,
`commitId=$(echo "\${commitId:0:7}")`,
`service=$(Build.Repository.Name)`,
`service=\${service##*/}`,
`service=$(./spk/spk service get-display-name -p ${relativeServiceForDockerfile})`,
`url=$(git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1)`,
`repourl=\${url##*@}`,
`. ./build.sh --source-only`,
`get_spk_version`,
`download_spk`,
`./spk/spk deployment create -n $(INTROSPECTION_ACCOUNT_NAME) -k $(INTROSPECTION_ACCOUNT_KEY) -t $(INTROSPECTION_TABLE_NAME) -p $(INTROSPECTION_PARTITION_KEY) --p1 $(Build.BuildId) --image-tag $tag_name --commit-id $commitId --service $service --repository $repourl`,
]),
displayName:
Expand Down
7 changes: 4 additions & 3 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ data, set up a Logic App to delete it. You can use the template
for this. Edit the values in `parameters` and fill in your `<subscription id>`
and `resource group` where the storage account is.

To check existing Logic Apps in your subscription, go to the [portal.azure.com](http://portal.azure.com) and search for Logic Apps.
To check existing Logic Apps in your subscription, go to the
[portal.azure.com](http://portal.azure.com) and search for Logic Apps.

# Scenarios Exercised So Far

Expand Down Expand Up @@ -84,11 +85,11 @@ To check existing Logic Apps in your subscription, go to the [portal.azure.com](

| Command | Coverage |
| ------------------------ | -------- |
| spk deployment get | 🚫 |
| spk deployment get | |
| spk deployment onboard ||
| spk deployment validate | 🚫 |
| spk deployment dashboard | 🚫 |
| spk deployment create | 🚫 |
| spk deployment create | |

## Infrastructure Management

Expand Down

0 comments on commit 7ad5325

Please sign in to comment.