Skip to content

Upload AzCopy binaries to Github #3014

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
43 changes: 31 additions & 12 deletions build-1es-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ extends:
displayName: 'Verify exe in zip'

# VerifyArtifacts end here

- stage: UploadToStorage
dependsOn:
- AzCopyVersion
Expand All @@ -779,8 +778,6 @@ extends:
value: '$(System.DefaultWorkingDirectory)/release'
- name: drop
value: '$(System.DefaultWorkingDirectory)/drop'
- name: publish_to_container
value: ${{ parameters.publish_to_container }}
- name: publish_to_m1_container
value: ${{ parameters.publish_to_m1_container }}
- name: azcopy_version
Expand Down Expand Up @@ -876,14 +873,10 @@ extends:
scriptLocation: inlineScript
inlineScript: |
today=$(date +"%Y%m%d")
if [ $(publish_to_container) = "True" ]; then
container_url="https://azcopyvnextrelease.blob.core.windows.net/%24web/releases/release-$(azcopy_version)-$today"
else
container_url="https://azcopyprivatedrops.blob.core.windows.net/%24web/releases/release-$(azcopy_version)-$today"
fi
echo "Artifacts will be uploaded to: $container_url"
container_url="https://azcopyprivatedrops.blob.core.windows.net/%24web/releases/release-$(azcopy_version)-$today"
echo "Artifacts will be uploaded to private drop container: $container_url"
AZCOPY_AUTO_LOGIN_TYPE=AzCLI ./azcopy cp "$(release)/*" "$container_url" --recursive --put-md5=true

if [ $(publish_to_m1_container) = "True" ]; then
m1_container_url="https://azcopyvnextrelease.blob.core.windows.net/%24web/azcopy-m1-drops/azcopy-$(azcopy_version)-$today"
AZCOPY_AUTO_LOGIN_TYPE=AzCLI ./azcopy cp "$(input)/azcopy-binaries-mac/azcopy_darwin_m1_arm64" "$m1_container_url" --recursive --put-md5=true
Expand Down Expand Up @@ -1015,6 +1008,27 @@ extends:
echo "v$(azcopy_version)"
displayName: 'AzCopy Tag Name'

- task : DownloadPipelineArtifacts@2
displayName: 'Download Linux, Windows, Mac Build Artifacts'
inputs:
artifactName: 'azcopy-*-signed'
downloadPath: $(Build.ArtifactStagingDirectory)

- script: |
sudo ls -lRt $(Build.ArtifactStagingDirectory)
displayName: 'List Artifacts'

- script: |
sudo apt-get clean
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -f --fix-missing
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt install apt-transport-https -y
sudo apt install dotnet-sdk-6.0 -y
displayName: 'Update Dependencies'

- task: GithubRelease@1
inputs:
githubConnection: 'azcopy-github-connection'
Expand All @@ -1028,13 +1042,19 @@ extends:
changeLogType: 'commitBased'
isDraft: ${{ parameters.draft }}
isPreRelease: ${{ parameters.prerelease }}
assets: |
$(Build.ArtifactStagingDirectory)/azCopy-linux-signed/*.deb
$(Build.ArtifactStagingDirectory)/azCopy-linux-signed/*.rpm
$(Build.ArtifactStagingDirectory)/azCopy-linux-signed/*.tar.gz
$(Build.ArtifactStagingDirectory)/azCopy-windows-signed/*.zip
$(Build.ArtifactStagingDirectory)/azCopy-mac-signed/*.zip
assetUploadMode: replace
addChangeLog: true

- ${{ if eq(parameters.publish_artifacts, true) }}:
- stage: PublishArtifacts
dependsOn:
- AzCopyVersion
- UploadToStorage
jobs:
- job: Job
timeoutInMinutes: 120
Expand Down Expand Up @@ -1186,7 +1206,6 @@ extends:
- stage: UpdateLatestVersion
dependsOn:
- AzCopyVersion
- UploadToStorage
jobs:
- job: Job
pool:
Expand Down
Loading