Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated URLs for upload to static website #2852

Merged
merged 4 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,8 @@ func init() {
_ = rootCmd.PersistentFlags().MarkHidden("debug-skip-files")
}

const versionMetadataUrl = "https://azcopyvnextrelease.z22.web.core.windows.net/releasemetadata/latest_version.txt"

// always spins up a new goroutine, because sometimes the aka.ms URL can't be reached (e.g. a constrained environment where
// aka.ms is not resolvable to a reachable IP address). In such cases, this routine will run for ever, and the caller should
// just give up on it.
Expand All @@ -290,8 +292,6 @@ func init() {
func beginDetectNewVersion() chan struct{} {
completionChannel := make(chan struct{})
go func() {
const versionMetadataUrl = "https://azcopyvnextrelease.blob.core.windows.net/releasemetadata/latest_version.txt"

// step 0: check the Stderr, check local version
_, err := os.Stderr.Stat()
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion cmd/versionChecker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ func TestCheckReleaseMetadata(t *testing.T) {

// sanity test for checking if the release metadata exists and can be downloaded
options := createClientOptions(nil, nil)
versionMetadataUrl := "https://azcopyvnextrelease.blob.core.windows.net/releasemetadata/latest_version.txt"

blobClient, err := blob.NewClientWithNoCredential(versionMetadataUrl, &blob.ClientOptions{ClientOptions: options})
a.NoError(err)
Expand Down
12 changes: 7 additions & 5 deletions release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
- name: tag
displayName: 'New Release Tag'
type: string
default: 'azcopy-'
default: 'v10.'

- name: publish_to_container
displayName: 'Publish To Container'
Expand Down Expand Up @@ -1813,9 +1813,9 @@ stages:
today=$(date +"%Y%m%d")

if [ $(Publish_To_Container) = "True" ]; then
container_url="https://$(Release_Account_Name).blob.core.windows.net/releases/release-$azcopy_version-$today"
container_url="https://$(Release_Account_Name).blob.core.windows.net/%24web/releases/release-$azcopy_version-$today"
else
container_url="https://$(Test_Release_Account_Name).blob.core.windows.net/releases/release-$azcopy_version-$today"
container_url="https://$(Test_Release_Account_Name).blob.core.windows.net/%24web/releases/release-$azcopy_version-$today"
fi
echo "Artifacts will be uploaded to: $container_url"

Expand All @@ -1828,7 +1828,7 @@ stages:
AZCOPY_AUTO_LOGIN_TYPE=AzCLI $executable_name cp "$(Build.ArtifactStagingDirectory)/*.zip" "$container_url" --put-md5=true

if [ $(Publish_To_M1_Container) = "True" ]; then
m1_container_url="https://azcopyvnextrelease.blob.core.windows.net/azcopy-m1-drops/azcopy-$azcopy_version-$today"
m1_container_url="https://$(Release_Account_Name).blob.core.windows.net/%24web/azcopy-m1-drops/azcopy-$azcopy_version-$today"
AZCOPY_AUTO_LOGIN_TYPE=AzCLI $executable_name cp "$(Build.ArtifactStagingDirectory)/azCopy-binaries/azcopy_darwin_m1_arm64" "$m1_container_url" --put-md5=true
fi

Expand Down Expand Up @@ -2134,6 +2134,8 @@ stages:
- group: AZCOPY_TESTS_VAR
- name: root_dir
value: '$(System.DefaultWorkingDirectory)'
- name: Release_Account_Name
value: 'azcopyvnextrelease'

steps:
- checkout: none
Expand Down Expand Up @@ -2180,7 +2182,7 @@ stages:
echo "azcopy version: $azcopy_version"

#Upload to release version blob file
upload_url="https://azcopyvnextrelease.blob.core.windows.net/releasemetadata/latest_version.txt"
upload_url="https://$(Release_Account_Name).blob.core.windows.net/%24web/releasemetadata/latest_version.txt"
echo "$azcopy_version" | azcopy copy "$upload_url" --from-to=PipeBlob --log-level=DEBUG --output-type=text > azcopy_output.txt

# Handle errors
Expand Down
Loading