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

[CI][VSTS] Move from python2 to python 3. #10657

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
586f058
[CI][VSTS] Move to python3.
mandel-macaque Feb 17, 2021
0018e54
Merge branch 'main' into move-python-3
mandel-macaque Feb 17, 2021
bd0cf0e
We now have pip3
mandel-macaque Feb 17, 2021
2e177b7
pip3
mandel-macaque Feb 18, 2021
11d2567
[CI][VSTS] Move to python3.
mandel-macaque Feb 17, 2021
584777a
We now have pip3
mandel-macaque Feb 17, 2021
6c0943f
Update the call for the script to take into account the new script.
mandel-macaque Feb 19, 2021
a67307e
Point to a test branch with the correct python code.
mandel-macaque Feb 22, 2021
ed41883
Not notarization is the new default.
mandel-macaque Feb 22, 2021
7599d5f
Merge branch 'move-python-3' of github.com:xamarin/xamarin-macios int…
mandel-macaque Feb 22, 2021
bfa69d2
xargs give me stodut.
mandel-macaque Feb 23, 2021
87787b0
Merge branch 'move-python-3' of github.com:xamarin/xamarin-macios int…
mandel-macaque Feb 23, 2021
655a16a
spaces.
mandel-macaque Feb 23, 2021
008fcc2
Do it one by one or we have a timeout.
mandel-macaque Mar 1, 2021
4bd173c
Fix logging.
mandel-macaque Mar 1, 2021
54e4cdd
Fix path with quotes.
mandel-macaque Mar 1, 2021
751f2bf
Dont be greedy.
mandel-macaque Mar 2, 2021
33ec7c7
Upload before notarizing to be able to test.
mandel-macaque Mar 2, 2021
32729aa
Add the nicer version of the script.
mandel-macaque Mar 2, 2021
374aa5d
Make python script very verbose.
mandel-macaque Mar 7, 2021
57ca836
Bump timeout.
mandel-macaque Mar 18, 2021
8b138f4
Merge branch 'move-python-3' of https://github.com/xamarin/xamarin-ma…
mandel-macaque Mar 18, 2021
87fc022
Faster installation.
mandel-macaque Mar 18, 2021
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
2 changes: 1 addition & 1 deletion tools/devops/automation/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ resources:
- repository: release-scripts
type: github
name: xamarin/release-scripts
ref: refs/heads/sign-and-notarized
ref: refs/heads/esrp-signing
endpoint: xamarin

variables:
Expand Down
35 changes: 25 additions & 10 deletions tools/devops/automation/templates/build/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ steps:
which python3

Write-Host "Pip version"
pip -V
pip3 -V
displayName: 'Show Python information'

- bash: $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/automation/scripts/bash/clean-bot.sh
Expand Down Expand Up @@ -381,6 +381,7 @@ steps:
inputs:
signType: 'Real'
azureSubscription: 'MicroBuild Signing Task (DevDiv)'
zipSources: false
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

Expand Down Expand Up @@ -421,21 +422,23 @@ steps:
PACKAGES="$IOS_PKG $MAC_PKG $IOS_DOTNET_PKG $TVOS_DOTNET_PKG $WATCHOS_DOTNET_PKG $MACOS_DOTNET_PKG"
echo "Packages found at $PACKAGES"

echo "$PACKAGES" | xargs python $(Build.SourcesDirectory)/release-scripts/sign_and_notarize.py --no_notarization -a "$APP_ID" -i "$INSTALL_ID" -u "$APPLE_ACCOUNT" -p "$APPLE_PASS" -t "$TEAM_ID" -d $(Build.SourcesDirectory)/package/notarized -e "$MAC_ENTITLEMENTS" -k "$KEYCHAIN"
echo "$PACKAGES" | xargs -t python3 $(Build.SourcesDirectory)/release-scripts/esrp_sign.py -vv -c "8023" -d $(Build.SourcesDirectory)/package/notarized -e "$MAC_ENTITLEMENTS"
ls -R $(Build.SourcesDirectory)/package
env:
PRODUCTSIGN_KEYCHAIN_PASSWORD: $(OSX_KEYCHAIN_PASS)
MAC_ENTITLEMENTS: $(Build.SourcesDirectory)/xamarin-macios/mac-entitlements.plist
APP_ID: $(XamarinAppId)
INSTALL_ID: $(XamarinAppId)
APPLE_ACCOUNT: $(XamarinUserId)
APPLE_PASS: $(XamarinPassword)
TEAM_ID: $(TeamID)
KEYCHAIN: $(SigningKeychain)
name: notarize
displayName: 'Signing Release Build'
condition: and(succeeded(), contains(variables['configuration.SignPkgs'], 'True'), contains(variables['configuration.IsPr'], 'False'))
timeoutInMinutes: 90
timeoutInMinutes: 180

# upload each of the pkgs into the pipeline artifacts
- task: PublishPipelineArtifact@1
displayName: 'Publish Not Notarized Build Artifacts'
inputs:
targetPath: $(Build.SourcesDirectory)/package/notarized
artifactName: not-notarized-pkg
continueOnError: true

- task: ms-vseng.MicroBuildTasks.30666190-6959-11e5-9f96-f56098202fef.MicroBuildSigningPlugin@3
displayName: 'Install Notarizing Plugin'
Expand All @@ -446,7 +449,19 @@ steps:
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)

- pwsh: $(Build.SourcesDirectory)/release-scripts/notarize.ps1 -FolderForApps $(Build.SourcesDirectory)/package/notarized
- pwsh: |
# so... we have to many pkgs, that results in timeouts, so we need to split things and call it several times
$pkgDir = "$(Build.SourcesDirectory)/package/notarized"
$files = @(Get-ChildItem -Path "$pkgDir/*" -Filter "*.pkg")
# we are going to be one by one... why? because if we send all, we timeout!!!!
if ($files.count -gt 0)
{
foreach($pkg in $files)
{
Write-Host "Notarizing $($pkg.FullName) into"
dotnet $Env:MBSIGN_APPFOLDER/DDSignFiles.dll /file:"$($pkg.FullName)" /certs:"8020"
}
}
displayName: 'ESRP notarizing packages'
condition: and(succeeded(), contains(variables['configuration.SignPkgs'], 'True'), contains(variables['configuration.IsPr'], 'False')) # if we are a PR, do not use ESRP since is not supported

Expand Down
2 changes: 1 addition & 1 deletion tools/devops/automation/templates/build/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
demands:
- Agent.OS -equals Darwin
- Agent.OSVersion -equals 10.15
- macios_image -equals v1
- macios_image -equals v1.1
workspace:
clean: all

Expand Down