Skip to content

Only notarize CI builds; timeout after 90 min - #7280

Merged
rolfbjarne merged 2 commits into
masterfrom
notarization-tweaks
Oct 23, 2019
Merged

Only notarize CI builds; timeout after 90 min#7280
rolfbjarne merged 2 commits into
masterfrom
notarization-tweaks

Conversation

@cadsit

@cadsit cadsit commented Oct 22, 2019

Copy link
Copy Markdown
Contributor

No description provided.

@cadsit
cadsit requested a review from rolfbjarne October 22, 2019 20:25
Comment thread jenkins/Jenkinsfile
sh (returnStatus: true, script: "security create-keychain -p ${env.KEYCHAIN_PASS} login.keychain") // needed to repopulate the keychain
sh ("security unlock-keychain -p ${env.KEYCHAIN_PASS} login.keychain")
sh ("python release-scripts/sign_and_notarize.py -a ${env.APP_ID} -i ${env.INSTALL_ID} -u ${env.APPLE_ACCOUNT} -p ${env.APPLE_PASS} -t ${env.TEAM_ID} -d package/notarized -e ${entitlements} -k login.keychain " + pkgs.flatten().join(" "))
timeout(time: 90, unit: 'MINUTES') {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
timeout(time: 90, unit: 'MINUTES') {
timeout (time: 90, unit: 'MINUTES') {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other timeout calls do have the space, other methods no. But lets be consistent.

Comment thread jenkins/Jenkinsfile Outdated
Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
@monojenkins

Copy link
Copy Markdown
Contributor

Build failure
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
🔥 Test run failed 🔥

@monojenkins

Copy link
Copy Markdown
Contributor

Build success
Build succeeded
API Diff (from stable)
API Diff (from PR only) (no change)
Generator Diff (no change)
Test run succeeded

@rolfbjarne
rolfbjarne merged commit cd396d6 into master Oct 23, 2019
rolfbjarne added a commit that referenced this pull request Oct 23, 2019
@rolfbjarne

Copy link
Copy Markdown
Member

@cadsit I had to revert this, because it failed the build: https://jenkins.internalx.com/blue/organizations/jenkins/macios/detail/master/935/pipeline/57

Notarization fails with:

Scripts not permitted to use staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods flatten java.lang.Object[]

which eventually causes

MicrosoftAzureStorage - Container name: wrench
MicrosoftAzureStorage - share name: 
MicrosoftAzureStorage - File path: package/notarized/*
MicrosoftAzureStorage - Virtual path: jenkins/master/cd396d63ccee7455d409355f61b438afbf410b36/935/
MicrosoftAzureStorage - Exclude path: 
MicrosoftAzureStorage - Uploading files to Microsoft Azure
MicrosoftAzureStorage - Need uploaded/archived file count = 0
MicrosoftAzureStorage - Uploaded/archived file count = 0
MicrosoftAzureStorage - Failed to find any build artifacts to upload to Azure Storage 
Verify the list of files to upload and that the Ant glob syntax is correct
ERROR: MicrosoftAzureStorage - Error occurred while uploading to Azure - bosstoragemirror
java.io.IOException: MicrosoftAzureStorage - Failed to find any build artifacts to upload to Azure Storage 
Verify the list of files to upload and that the Ant glob syntax is correct
	at com.microsoftopentechnologies.windowsazurestorage.WAStoragePublisher.perform(WAStoragePublisher.java:430)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

so there are two bugs:

  • Calling pkgs.flatten() is not allowed
  • Trying to upload 0 notarized packages (which ends up failing)

@cadsit

cadsit commented Oct 23, 2019

Copy link
Copy Markdown
Contributor Author

Ah -- I should have been able to catch that. I've been bitten by that a few times before.

There's a subtle difference between list types in groovy and by not initializing pkgs = [], I think we ended up with a type that has not yet been approved through the glories of Jenkins Catalina-esque security system. The annoying part, however, is that I don't have the method available to approve (I think because of exception handling).

@rolfbjarne rolfbjarne added the not-notes-worthy Ignore for release notes label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-notes-worthy Ignore for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants