diff --git a/src/lib/fileutils.ts b/src/lib/fileutils.ts index d615d016d..95d285fed 100644 --- a/src/lib/fileutils.ts +++ b/src/lib/fileutils.ts @@ -195,16 +195,17 @@ 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=$(./spk/spk service get-display-name -p ${relativeServiceForDockerfile})`, + `service=$(Build.Repository.Name)`, + `service=\${service##*/}`, `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: diff --git a/src/test/mockFactory.ts b/src/test/mockFactory.ts index 13924884f..be829ac53 100644 --- a/src/test/mockFactory.ts +++ b/src/test/mockFactory.ts @@ -75,16 +75,17 @@ 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=$(./spk/spk service get-display-name -p ${relativeServiceForDockerfile})`, + `service=$(Build.Repository.Name)`, + `service=\${service##*/}`, `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: diff --git a/tests/README.md b/tests/README.md index b21998f84..b6e03ba92 100644 --- a/tests/README.md +++ b/tests/README.md @@ -33,8 +33,7 @@ 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 `` 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 @@ -85,11 +84,11 @@ To check existing Logic Apps in your subscription, go to the | 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