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

Only notarize CI builds; timeout after 90 min #7280

Merged
merged 2 commits into from
Oct 23, 2019
Merged

Conversation

cadsit
Copy link
Contributor

@cadsit cadsit commented Oct 22, 2019

No description provided.

withCredentials([string(credentialsId: 'codesign_keychain_pw', variable: 'KEYCHAIN_PASS'), string(credentialsId: 'team_id', variable: 'TEAM_ID'), string(credentialsId: 'application_id', variable: 'APP_ID'), string(credentialsId: 'installer_id', variable: 'INSTALL_ID'), usernamePassword(credentialsId: 'apple_account', passwordVariable: 'APPLE_PASS', usernameVariable: 'APPLE_ACCOUNT')]) {
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
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
Member

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.

jenkins/Jenkinsfile Outdated Show resolved Hide resolved
Co-Authored-By: Rolf Bjarne Kvinge <[email protected]>
@monojenkins
Copy link
Collaborator

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
Collaborator

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
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
Copy link
Contributor Author

cadsit commented Oct 23, 2019

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