Skip to content

Commit

Permalink
[ci] Report artifact status to the correct repo (#4097)
Browse files Browse the repository at this point in the history
The `notarize_pkg_upload_storage` job is responsible for posting
artifact metadata to GitHub as a commit status, and the `.vsix`
signing performed by the `queue_vsix_signing` job depends upon the
presence of this GitHub status.

Commit ed29bf1 broke the posting of the status, as it changed the
source checkout behavior for this job.

We report artifact metadata to GitHub with the [Artifacts tool][0],
and this tool must be ran inside the source directory that it is
going to create a GitHub commit status for.  With ed29bf1, we started
executing this tool within a `release-scripts` checkout rather than a
`xamarin-android` checkout.  This change meant that the required
status was no longer being posted, which in turn caused the
`queue_vsix_signing` job to always fail.

Fix the `queue_vsix_signing` job by cloning both the xamarin-android
and release-scripts repos so that the artifacts tool can run within the
xamarin-android checkout and successfully report a status back to it.

[0]: https://github.com/xamarinhq/build-tasks/tree/master/Artifacts
  • Loading branch information
pjcollins authored and jonpryor committed Jan 8, 2020
1 parent cd99de1 commit d66aed0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ stages:
variables:
- group: Xamarin Notarization
steps:
- checkout: self

- checkout: release_scripts
clean: true
persistCredentials: true
Expand Down Expand Up @@ -350,6 +352,7 @@ stages:
UnsignedPkgPath: $(XA.Unsigned.Pkg)

- script: |
cd $(System.DefaultWorkingDirectory)/release-scripts
git checkout $(ReleaseScriptsBranch)
sudo xcode-select -s /Applications/$(NotarizationXcode)
ruby notarize.rb $(XA.Unsigned.Pkg) $(XamarinIdentifier) $(XamarinUserId) $(XamarinPassword) $(TeamID)
Expand All @@ -360,6 +363,7 @@ stages:
BuildPackages: $(System.DefaultWorkingDirectory)/storage-artifacts
AzureContainerName: $(Azure.Container.Name)
AzureUploadLocation: $(Build.DefinitionName)/$(Build.BuildId)/$(Build.SourceBranchName)/$(Build.SourceVersion)
SourceDirectory: $(System.DefaultWorkingDirectory)/xamarin-android

# Check - "Xamarin.Android (Finalize Installers Queue Vsix Signing)"
- job: queue_vsix_signing
Expand Down

0 comments on commit d66aed0

Please sign in to comment.