-
Notifications
You must be signed in to change notification settings - Fork 136
Add more build artifacts and automatically publish to BAR. #1395
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
Changes from all commits
0e9ab4a
e1e3583
792e841
25419f4
beda796
10d403c
42b631a
12e4ddd
daa2084
707b9d9
ba3a2e0
4551dd2
a194d5c
ae4a7e9
a58eeb4
1654457
aab1a91
f7c4736
e9dfecc
8373e7d
3c1a980
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
jobs: | ||
- job: Collect_Artifacts | ||
|
||
dependsOn: ${{ parameters.dependsOn }} | ||
|
||
displayName: Collect Artifacts | ||
|
||
pool: ${{ parameters.pool }} | ||
|
||
steps: | ||
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: | ||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download CentOS artifacts | ||
inputs: | ||
artifactName: Tarball centos71 Offline | ||
downloadPath: '$(Build.StagingDirectory)/centos' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO you should use an |
||
|
||
- task: Bash@3 | ||
inputs: | ||
targetType: 'inline' | ||
workingDirectory: '$(Build.StagingDirectory)/centos' | ||
script: | | ||
rm */tarball*.tar.gz | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download Debian artifacts | ||
inputs: | ||
artifactName: Tarball debian9 Offline | ||
downloadPath: '$(Build.StagingDirectory)/debian' | ||
|
||
- task: Bash@3 | ||
inputs: | ||
targetType: 'inline' | ||
workingDirectory: '$(Build.StagingDirectory)/debian' | ||
script: | | ||
rm */tarball*.tar.gz | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download Fedora artifacts | ||
inputs: | ||
artifactName: Tarball fedora30 Offline | ||
downloadPath: '$(Build.StagingDirectory)/fedora' | ||
|
||
- task: Bash@3 | ||
inputs: | ||
targetType: 'inline' | ||
workingDirectory: '$(Build.StagingDirectory)/fedora' | ||
script: | | ||
rm */tarball*.tar.gz | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download Ubuntu artifacts | ||
inputs: | ||
artifactName: Tarball ubuntu1804 Offline | ||
downloadPath: '$(Build.StagingDirectory)/ubuntu' | ||
|
||
- task: Bash@3 | ||
inputs: | ||
targetType: 'inline' | ||
workingDirectory: '$(Build.StagingDirectory)/ubuntu' | ||
script: | | ||
rm */tarball*.tar.gz | ||
|
||
- task: DownloadBuildArtifacts@0 | ||
displayName: Download portable artifacts | ||
inputs: | ||
artifactName: Tarball centos71 Offline Portable | ||
downloadPath: '$(Build.StagingDirectory)/portable' | ||
|
||
- task: Bash@3 | ||
inputs: | ||
targetType: 'inline' | ||
workingDirectory: '$(Build.StagingDirectory)/portable' | ||
script: | | ||
rm */tarball*.tar.gz | ||
|
||
- task: Bash@3 | ||
inputs: | ||
targetType: 'inline' | ||
workingDirectory: '$(Build.StagingDirectory)' | ||
script: | | ||
version=`echo centos/*/Private.SourceBuilt.Artifacts*.tar.gz | sed 's/\.tar\.gz$//' | sed 's/^centos\/.*\/Private\.SourceBuilt\.Artifacts\.//'` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
echo "Artifacts version: $version" | ||
mkdir collected | ||
cd collected | ||
# do CentOS last to prefer those versions of any duplicates | ||
for os in portable debian fedora ubuntu centos; do | ||
# DownloadArtifact creates another directory - use '*' to not deal with this | ||
tar xzf ../$os/*/Private.SourceBuilt.Artifacts*.tar.gz | ||
rm -rf ../$os | ||
done | ||
echo $(Build.SourceVersion) > .version | ||
echo $(Build.BuildNumber) > .buildnumber | ||
echo $(Build.BuildId) > .buildid | ||
tar czf ../Private.SourceBuilt.Artifacts.$version.tar.gz * .version .buildnumber .buildid | ||
crummel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
rm -rf * | ||
mv ../Private.SourceBuilt.Artifacts.*.tar.gz . | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It isn't clear to me what this artifact will be used for... sounds like more than diag if it's ending in BAR, so I'm a little concerned since point of source-build is that you can't get a combined artifact like this. |
||
displayName: Collect RID-specific packages into one tarball | ||
condition: succeeded() | ||
|
||
- task: PowerShell@2 | ||
crummel marked this conversation as resolved.
Show resolved
Hide resolved
|
||
inputs: | ||
targetType: 'filePath' | ||
filePath: $(Build.SourcesDirectory)\publish.ps1 | ||
arguments: >- | ||
/p:OfficialBuildId=$(Build.BuildNumber) | ||
/p:AzureAccountName=$(publish.blobStorage.account) | ||
/p:ContainerName=$(publish.blobStorage.container) | ||
"/p:AzureAccessToken=$(publish.blobStorage.accessToken)" | ||
"/p:ManifestName=$(BUILD.REPOSITORY.NAME)" | ||
"/p:ManifestBuildId=$(BUILD.BUILDID)" | ||
"/p:ManifestBranch=$(BUILD.SOURCEBRANCHNAME)" | ||
/p:ManifestCommit=$(Build.SourceVersion) | ||
/p:DotNetPublishToBlobFeed=true | ||
workingDirectory: '$(Build.SourcesDirectory)' | ||
displayName: Publish collected artifacts | ||
condition: succeeded() | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: Uploaded collected artifacts | ||
condition: always() | ||
continueOnError: true | ||
inputs: | ||
PathToPublish: $(Build.SourcesDirectory)/artifacts/tarball/ | ||
ArtifactName: Collected artifacts | ||
ArtifactType: Container | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: Uploaded asset manifests | ||
condition: always() | ||
continueOnError: true | ||
inputs: | ||
PathToPublish: $(Build.SourcesDirectory)/artifacts/asset-manifests/ | ||
ArtifactName: AssetManifests | ||
ArtifactType: Container | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: Upload publish logs | ||
condition: always() | ||
continueOnError: true | ||
inputs: | ||
PathToPublish: $(Build.SourcesDirectory)/artifacts/log/ | ||
ArtifactName: Publishing logs | ||
ArtifactType: Container | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would be better to have in the build itself... this seems like a useful diagnosis artifact someone can give us when source-build doesn't work for them.
The paths also might also be clearer in that context--using the project props rather than writing out full names in multiple places.