Skip to content

Commit

Permalink
Release pipeline for linux, mariner, mac and windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dphulkar-msft committed Jun 20, 2024
1 parent eb0bc08 commit 1574146
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
27 changes: 14 additions & 13 deletions release-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1187,11 +1187,12 @@ stages:
displayName: 'Publish Signed Artifacts'

- script: |
rm -rf $(Build.ArtifactStagingDirectory)/*.zip
mkdir -p $(Build.ArtifactStagingDirectory)/unzipped
unzip -o $(Build.ArtifactStagingDirectory)/*.zip -d $(Build.ArtifactStagingDirectory)/unzipped
unzip -o $(Build.ArtifactStagingDirectory)/azcopy*amd64*.zip -d $(Build.ArtifactStagingDirectory)/unzipped
mv $(Build.ArtifactStagingDirectory)/unzipped/azcopy_darwin* $(Build.ArtifactStagingDirectory)/
rm -rf $(Build.ArtifactStagingDirectory)/unzipped
rm -rf $(Build.ArtifactStagingDirectory)/*.zip
sudo ls -ltR $(Build.ArtifactStagingDirectory)
displayName: 'Copy signed mac binary to staging directory'
Expand Down Expand Up @@ -1316,8 +1317,8 @@ stages:
workingDirectory: $(System.DefaultWorkingDirectory)/azCopy-linux-signed
- script: |
azcopy --version
azcopy --help
azcopy_linux_amd64 --version
azcopy_linux_amd64 --help
displayName: 'Check Version and Help'
- job: Set_2
Expand Down Expand Up @@ -1354,8 +1355,8 @@ stages:
workingDirectory: $(System.DefaultWorkingDirectory)/azCopy-linux-signed
- script: |
azcopy --version
azcopy --help
azcopy_linux_arm64 --version
azcopy_linux_arm64 --help
displayName: 'Check Version and Help'
- job: Set_3
Expand Down Expand Up @@ -1394,8 +1395,8 @@ stages:
workingDirectory: $(System.DefaultWorkingDirectory)/azCopy-linux-signed
- script: |
azcopy --version
azcopy --help
azcopy_linux_arm64 --version
azcopy_linux_arm64 --help
displayName: 'Check Version and Help'
- job: Set_4
Expand Down Expand Up @@ -1439,8 +1440,8 @@ stages:
workingDirectory: $(System.DefaultWorkingDirectory)/azCopy-linux-signed
- script: |
azcopy --version
azcopy --help
azcopy_linux_amd64 --version
azcopy_linux_amd64 --help
displayName: 'Check Version and Help'
- job: Set_5
Expand Down Expand Up @@ -1483,8 +1484,8 @@ stages:
workingDirectory: $(System.DefaultWorkingDirectory)/azCopy-linux-signed/mariner
- script: |
azcopy --version
azcopy --help
azcopy_linux_amd64 --version
azcopy_linux_amd64 --help
displayName: 'Check Version and Help'
- job: Set_6
Expand Down Expand Up @@ -1725,7 +1726,7 @@ stages:
# Upload the archived builds
AZCOPY_AUTO_LOGIN_TYPE=AzCLI $executable_name cp "$(Build.ArtifactStagingDirectory)/azCopy-windows-signed/*" "$container_url" --recursive --put-md5=true
AZCOPY_AUTO_LOGIN_TYPE=AzCLI $executable_name cp "$(Build.ArtifactStagingDirectory)/azCopy-linux-signed/*.tar.gz" "$container_url" --recursive --put-md5=true
AZCOPY_AUTO_LOGIN_TYPE=AzCLI $executable_name cp "$(Build.ArtifactStagingDirectory)/azCopy-linux-signed/*" "$container_url" --recursive --put-md5=true
AZCOPY_AUTO_LOGIN_TYPE=AzCLI $executable_name cp "$(Build.ArtifactStagingDirectory)/azCopy-mac-signed/*" "$container_url" --recursive --put-md5=true
AZCOPY_AUTO_LOGIN_TYPE=AzCLI $executable_name cp "$(Build.ArtifactStagingDirectory)/*.zip" "$container_url" --put-md5=true
Expand Down
8 changes: 3 additions & 5 deletions setup/releaseVersionUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
sasToken = sasUrl.split('?')[1]

# delete latest version file in the container
# deleteUrl = containerUrl + '/' + 'latest_version.txt' + '?' + sasToken
# print(f"deleteURL: '{deleteUrl}'")
# resp = requests.delete(deleteUrl)
# sys.exit(1) if(resp.status_code<200 or resp.status_code>202) else print('Deleted last release file')
deleteUrl = containerUrl + '/' + 'latest_version.txt' + '?' + sasToken
resp = requests.delete(deleteUrl)
sys.exit(1) if(resp.status_code<200 or resp.status_code>202) else print('Deleted last release file')

# Create a file and write data to it
file_name = 'latest_version.txt'

# Open the file in write mode
with open(file_name, 'w') as file:
file.write(releaseVersion)
Expand Down

0 comments on commit 1574146

Please sign in to comment.