-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Host OS: CentOS Linux release 7.2.1511
Java: java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64
Jenkins: jenkins-1.625.3-1.1.noarch (official rpm from jenkins-ci.org)
P4 Plugin: version 1.3.6 (from http://updates.jenkins-ci.org/latest/p4.hpi)
Mailer Plugin: version 1.11 (bundled with Jenkins)
Perforce server: P4D/LINUX26X86_64/2015.1/1227227Host OS: CentOS Linux release 7.2.1511 Java: java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64 Jenkins: jenkins-1.625.3-1.1.noarch (official rpm from jenkins-ci.org) P4 Plugin: version 1.3.6 (from http://updates.jenkins-ci.org/latest/p4.hpi) Mailer Plugin: version 1.11 (bundled with Jenkins) Perforce server: P4D/LINUX26X86_64/2015.1/1227227
Use case:
I have a Freestyle project with sources fetched by p4 plugin in "manual (custom view)" mode. The project has a post-build action "E-mail Notification" with a "Send separate e-mails to individuals who broke the build" checkbox checked. Mailer Plugin tries to compose a notification when build fails. The problem is that Mailer Plugin is not able to get emails corresponding to Perforce accounts.
Example Console Output:
Building in workspace /var/lib/jenkins/workspace/backup ... p4 client -o jenkins-master-backup + ... p4 info + P4 Task: establishing connection. ... server: <censored> ... node: <censored> ... p4 client -o jenkins-master-backup + ... p4 client -i + ... client: jenkins-master-backup ... p4 client -o jenkins-master-backup + ... p4 info + ... p4 counter change + ... p4 changes -m1 //jenkins-master-backup/... + Building on Node: master ... p4 client -o jenkins-master-backup + ... p4 info + P4 Task: establishing connection. ... server: <censored> ... node: <censored> P4 Task: syncing files at change: 1657621 ... p4 sync -q /var/lib/jenkins/workspace/backup/...@1657621 + duration: (25ms) P4 Task: saving built changes. ... p4 client -o jenkins-master-backup + ... p4 info + ... p4 client -o jenkins-master-backup + ... p4 info + ... p4 client -o jenkins-master-backup + ... p4 info + ... p4 changes -l @=1657621 + ... p4 user -o Smith + ... p4 files -m51 @=1657621 + ... p4 fixes -c1657621 + ... done [backup] $ /bin/sh -ex /tmp/hudson3013805400501810634.sh + exit 1 Build step 'Execute shell' marked build as failure Failed to send e-mail to Smith because no e-mail address is known, and no default e-mail domain is configured An attempt to send an e-mail to empty list of recipients, ignored. Finished: FAILURE
The problem is this: "Failed to send e-mail to Smith because no e-mail address is known, and no default e-mail domain is configured"
Info on user Smith:
# /opt/perforce/bin/p4 user -o Smith # A Perforce User Specification. # <more comments skipped> User: Smith Email: John.Smith@company.com Update: <censored> Access: <censored> FullName: John Smith Password: ****** # cat /var/lib/jenkins/users/smith/config.xml <?xml version='1.0' encoding='UTF-8'?> <user> <fullName>Smith</fullName> <properties> <hudson.model.PaneStatusProperties> <collapsed/> </hudson.model.PaneStatusProperties> <jenkins.security.ApiTokenProperty> <apiToken>censored</apiToken> </jenkins.security.ApiTokenProperty> <com.cloudbees.plugins.credentials.UserCredentialsProvider_-UserCredentialsProperty plugin="credentials@1.18"> <domainCredentialsMap class="hudson.util.CopyOnWriteMap$Hash"/> </com.cloudbees.plugins.credentials.UserCredentialsProvider_-UserCredentialsProperty> <hudson.tasks.Mailer_-UserProperty plugin="mailer@1.11"/> <hudson.plugins.emailext.watching.EmailExtWatchAction_-UserProperty plugin="email-ext@2.41"> <triggers/> </hudson.plugins.emailext.watching.EmailExtWatchAction_-UserProperty> <hudson.model.MyViewsProperty> <views> <hudson.model.AllView> <owner class="hudson.model.MyViewsProperty" reference="../../.."/> <name>All</name> <filterExecutors>false</filterExecutors> <filterQueue>false</filterQueue> <properties class="hudson.model.View$PropertyList"/> </hudson.model.AllView> </views> </hudson.model.MyViewsProperty> <hudson.search.UserSearchProperty> <insensitiveSearch>false</insensitiveSearch> </hudson.search.UserSearchProperty> <org.jenkinsci.plugins.p4.email.P4UserProperty plugin="p4@1.3.6"> <email>John.Smith@company.com</email> </org.jenkinsci.plugins.p4.email.P4UserProperty> </properties> </user>
Example log on org.jenkinsci.plugins.p4 + hudson.tasks :
Feb 10, 2016 4:48:30 PM FINE org.jenkinsci.plugins.p4.client.ConnectionHelper P4: opened connection OK Feb 10, 2016 4:48:31 PM FINE org.jenkinsci.plugins.p4.changes.P4ChangeEntry Setting email for user: Smith:John.Smith@company.com Feb 10, 2016 4:48:31 PM FINE org.jenkinsci.plugins.p4.client.ConnectionHelper P4: closed connection OK Feb 10, 2016 4:48:31 PM FINE org.jenkinsci.plugins.p4.client.ConnectionHelper P4: opened connection OK Feb 10, 2016 4:48:33 PM FINE org.jenkinsci.plugins.p4.client.ConnectionHelper P4: opened connection OK Feb 10, 2016 4:48:34 PM FINE org.jenkinsci.plugins.p4.client.ConnectionHelper P4: opened connection OK Feb 10, 2016 4:48:35 PM FINE org.jenkinsci.plugins.p4.client.ConnectionHelper P4: opened connection OK Feb 10, 2016 4:48:38 PM FINE hudson.tasks.MailAddressResolver Resolving e-mail address for "Smith" ID=smith Feb 10, 2016 4:48:38 PM FINER hudson.tasks.Mailer No ArtifactArchiver found Feb 10, 2016 4:48:38 PM FINER hudson.tasks.Mailer No ArtifactArchiver found Feb 10, 2016 4:48:38 PM FINER hudson.tasks.Mailer No ArtifactArchiver found Feb 10, 2016 4:48:38 PM FINE org.jenkinsci.plugins.p4.client.ConnectionHelper P4: opened connection OK