This repository was archived by the owner on Apr 13, 2020. It is now read-only.
File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,9 @@ export const serviceBuildAndUpdatePipeline = (
136
136
variableGroups ?: string [ ]
137
137
) : AzurePipelinesYaml => {
138
138
const relativeServicePathFormatted = sanitizeTriggerPath ( relServicePath ) ;
139
+ const relativeServiceForDockerfile = relServicePath . startsWith ( "./" )
140
+ ? relServicePath
141
+ : "./" + relServicePath ;
139
142
140
143
const pipelineYaml : AzurePipelinesYaml = {
141
144
trigger : {
@@ -206,7 +209,7 @@ export const serviceBuildAndUpdatePipeline = (
206
209
`export IMAGE_TAG=${ IMAGE_TAG } ` ,
207
210
`export IMAGE_NAME=$BUILD_REPO_NAME:$IMAGE_TAG` ,
208
211
`echo "Image Name: $IMAGE_NAME"` ,
209
- `cd ${ relativeServicePathFormatted } ` ,
212
+ `cd ${ relativeServiceForDockerfile } ` ,
210
213
`echo "az acr build -r $(ACR_NAME) --image $IMAGE_NAME ."` ,
211
214
`az acr build -r $(ACR_NAME) --image $IMAGE_NAME .`
212
215
] ) ,
Original file line number Diff line number Diff line change @@ -23,6 +23,12 @@ export const createTestServiceBuildAndUpdatePipelineYaml = (
23
23
ringBranches : string [ ] = [ "master" , "qa" , "test" ] ,
24
24
variableGroups : string [ ] = [ ]
25
25
) : AzurePipelinesYaml | string => {
26
+ const relativeServiceForDockerfile = relativeServicePathFormatted . startsWith (
27
+ "./"
28
+ )
29
+ ? relativeServicePathFormatted
30
+ : "./" + relativeServicePathFormatted ;
31
+
26
32
const data : AzurePipelinesYaml = {
27
33
trigger : {
28
34
branches : { include : ringBranches } ,
@@ -90,7 +96,7 @@ export const createTestServiceBuildAndUpdatePipelineYaml = (
90
96
`export IMAGE_TAG=${ IMAGE_TAG } ` ,
91
97
`export IMAGE_NAME=$BUILD_REPO_NAME:$IMAGE_TAG` ,
92
98
`echo "Image Name: $IMAGE_NAME"` ,
93
- `cd ${ sanitizeTriggerPath ( relativeServicePathFormatted ) } ` ,
99
+ `cd ${ relativeServiceForDockerfile } ` ,
94
100
`echo "az acr build -r $(ACR_NAME) --image $IMAGE_NAME ."` ,
95
101
`az acr build -r $(ACR_NAME) --image $IMAGE_NAME .`
96
102
] ) ,
You can’t perform that action at this time.
0 commit comments