Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 819a2f6

Browse files
authored
Skip container creation (#17655)
Skip container creation if not in flatcontainer mode Container creation isn't required and would be incorrect if the ExpectedFeedUrl's account name didn't match AccountName
1 parent 1ac9b83 commit 819a2f6

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

src/publish.proj

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@
3838
</ItemsToPush>
3939
</ItemGroup>
4040

41-
<!-- create the container if it doesn't exist -->
42-
<CreateAzureContainer AccountKey="$(AccountKey)"
43-
AccountName="$(AccountName)"
44-
ContainerName="$(ContainerName)"
45-
IsPublic="true" />
46-
4741
<PushToBlobFeed Condition="'$(PublishFlatContainer)' == 'false'"
4842
ExpectedFeedUrl="$(ExpectedFeedUrl)"
4943
AccountKey="$(AccountKey)"
@@ -54,6 +48,13 @@
5448
ManifestBranch="$(ManifestBranch)"
5549
ManifestCommit="$(ManifestCommit)" />
5650

51+
<!-- create the container if it doesn't exist -->
52+
<CreateAzureContainer Condition="'$(PublishFlatContainer)' == 'true'"
53+
AccountKey="$(AccountKey)"
54+
AccountName="$(AccountName)"
55+
ContainerName="$(ContainerName)"
56+
IsPublic="true" />
57+
5758
<!-- now upload the items -->
5859
<UploadToAzure Condition="'$(PublishFlatContainer)' == 'true'"
5960
AccountKey="$(AccountKey)"
@@ -75,12 +76,6 @@
7576
</ItemsToPush>
7677
</ItemGroup>
7778

78-
<!-- create the container if it doesn't exist -->
79-
<CreateAzureContainer AccountKey="$(AccountKey)"
80-
AccountName="$(AccountName)"
81-
ContainerName="$(ContainerName)"
82-
IsPublic="true" />
83-
8479
<PushToBlobFeed Condition="'$(PublishFlatContainer)' == 'false'"
8580
ExpectedFeedUrl="$(ExpectedFeedUrl)"
8681
AccountKey="$(AccountKey)"
@@ -91,6 +86,13 @@
9186
ManifestBranch="$(ManifestBranch)"
9287
ManifestCommit="$(ManifestCommit)" />
9388

89+
<!-- create the container if it doesn't exist -->
90+
<CreateAzureContainer Condition="'$(PublishFlatContainer)' == 'true'"
91+
AccountKey="$(AccountKey)"
92+
AccountName="$(AccountName)"
93+
ContainerName="$(ContainerName)"
94+
IsPublic="true" />
95+
9496
<!-- now upload the items -->
9597
<UploadToAzure Condition="'$(PublishFlatContainer)' == 'true'"
9698
AccountKey="$(AccountKey)"
@@ -113,18 +115,19 @@
113115
</ItemsToPush>
114116
</ItemGroup>
115117

116-
<!-- create the container if it doesn't exist -->
117-
<CreateAzureContainer AccountKey="$(AccountKey)"
118-
AccountName="$(AccountName)"
119-
ContainerName="$(ContainerName)"
120-
IsPublic="true" />
121-
122118
<PushToBlobFeed Condition="'$(PublishFlatContainer)' == 'false'"
123119
ExpectedFeedUrl="$(ExpectedFeedUrl)"
124120
AccountKey="$(AccountKey)"
125121
ItemsToPush="@(ItemsToPush)"
126122
Overwrite="$(OverwriteOnPublish)" />
127123

124+
<!-- create the container if it doesn't exist -->
125+
<CreateAzureContainer Condition="'$(PublishFlatContainer)' == 'true'"
126+
AccountKey="$(AccountKey)"
127+
AccountName="$(AccountName)"
128+
ContainerName="$(ContainerName)"
129+
IsPublic="true" />
130+
128131
<!-- now upload the items -->
129132
<UploadToAzure Condition="'$(PublishFlatContainer)' == 'true'"
130133
AccountKey="$(AccountKey)"

0 commit comments

Comments
 (0)