After a build is finished I use the mail-ext-plugin (Jenkins Email Extension Plugin) to send an email to certain users. I would like to include the user who started (requested) the build in that email. I have tried the suggestion here however, that didn't seem to work I just got this error.
Error in script or template: groovy.lang.MissingPropertyException: No such property: CAUSE for class: SimpleTemplateScript4
After much searching I found a page on jelly usage on the Jenkins wiki (here). There is a link on this page which contains all the useable classes. I was able to find the cause class and used this great example to help me implement it in my code. I added
<%
for (hudson.model.Cause cause : build.causes) {
%>
${cause.shortDescription}
<%
}
%>
which produced -
Started by user Matthew Armstrong
Related
I am working on app in elixir. It sends email to clients. I am using bamboo library for sending emails.
So far, emails are working fine. But now, I am trying to send emails using templates.
Everywhere i see in the bamboo documentation is using
bamboo.phoenix .
I am not using phoenix for handling requests. I am using a library called plug. Is there a way to send templates in email without phoenix ??
Adding answer to this post with the help #JustMichael comment.
Directory structure -
/priv
/static
/test.html.eex
Function used :
new_email
|> to("vivek29vivek#gmail.com")
|> from(#from_email)
|> subject("test")
|> html_body(EEx.eval_file("priv/static/mail_templates/#test.html.eex",[foo: "bar"])) //this will render the template.Also can pass variables
test.html.eex
<h3>Foo: <%= foo %></h3>
But , we cannot add css just by adding <link rel="stylesheet" href="styles.css"> . I guess, There is a need for static server.
Do comment if there is another way to add css apart from inline css.
Thank you in advance for any and all help.
I've been having a ridiculous issue with trying to get my rails 4 app to take in data from an email parsing API that sends an XML response to a specified url within my application. For whatever reason I can't seem to find, the data is not getting into my application via the HTTP Post from the API.
When I test out using requestb.in and Advanced Rest Client everything works great, however when I try to send the data to my app, no dice. I'm currently sending to my dev branch via Pow.cx so it has a specific url to send to. I've been testing using google's Advanced Rest Client and requestb.in and using requestbin I've had no problem getting the data to show up on Advanced Rest Client, however it will not get into my App. Any help will be super appreciated. Thank you!!
My Routes:
get 'worldmate/receive', to: 'worldmate#receive'
post 'worldmate/receive', to: 'worldmate#receive'
In My Controller:
require 'nokogiri'
require 'net/http'
require 'open-uri'
require 'json'
class WorldmateController < ActionController::Base
def receive
#request = request
#xml = #request.body
#string = #request.body.read
#size = #request.body.size
end
My erb:
<p> Request: <%= #string %> <p>
<br>
<p> Less Detailed Request: <%= #xml %> </p>
<br>
<p> Size: <%= #size %> </p>
I have no idea why my app isn't taking this data in. When I send a post request using Advanced Rest Client it works totally fine. Any and all help is SUPER appreciated. Many thanks.
My guess is that you have configured your email parsing service to POST the data to a URL which is only accessible from your local system, for instance a pow.cx style ".dev" URL.
The reason this works using your test utility is I'm assuming the test client is also on your local machine and therefore your local server is addressable from there.
The way I've worked around this is using tunneling. Ngrok is a nice, low-config tool for tunneling, but there are many solutions out there to make your local dev environment accessible from the web for testing purposes.
I am new to the magento, and right now, i was working one website.
I did my initial development on my local machine and everything was fine. few days ago I moved the website into test server from my localhost. after that the checkout function is not working properly.
the problem is that i have almost have nothing on that page.
if user is not logged in, then he(she) sees 2 steps as log in, and billing information, but without content. only the titles.
if user is logged in, then he(she) sees step 1 billing information title, and again no content
the website is http://guerrilla.webionaria.com/
user:teste#mail.ru
password:testtest
can anyone help me with this please
There is a 'Fatal error' on your page.
The rendering stops with
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id',
The error appears in app/design/frontend/{interface}/{theme}/template/checkout/onepage/billing.phtml or in app/design/frontend/{interface}/{theme}/template/persistent/checkout/onepage/billing.phtml (if you have cart persistence enabled).
In both of the cases, for some reason this code gives an error:
<?php echo $this->helper('directory')->getRegionJson() ?>
To find out what the error is you need to enable error reporting and display_errors.
You can do that from index.php.
error_reporting(E_ALL | E_STRICT);
...
ini_set('display_errors', 1);
You can also enable the developer mode by changing this:
if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
Mage::setIsDeveloperMode(true);
}
to this
//if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
Mage::setIsDeveloperMode(true);
//}
Then try again. If the error does not appear on your screen look at the source of the page.
If the error does not tell you anything update the question with its contents.
Just installed Magento for the first time on my Localhost. And found the same problem. I found the solution in following way:
-- Enabled the error logs in System > Configuration > Developer Tools
-- Then attempted a checkout.
Bam! found the error in var/logs/system.log
The error was due to SOAP. I needed to enable PHP's soap library. And it proceeded well.
Hope it helps someone :)
I am writing a Redmine plugin. I already have the model, view and controller in place.
Whenever someone creates, updates or deletes my model I want to send an email to people in a certain group. (Similar to emails sent out by Redmine when someone creates or updates an Issue) Could someone please let me know what would be the best way to go about it?
Thanks!
I know it's been 2 years since you asked but I had the same issue and I figured out how to send an email with my plugin.
What you have to do for a plugin named my_plugin is :
1. Create a Model which inherits from Mailer.
So if I want a mailer named MyPluginMailer :
I create redmine_folder/plugins/my_plugin/app/models/my_plugin_mailer.rb
I create the MyPluginMailer class which inherits from the redmine Mailer
Like that:
class MyPluginMailer < Mailer
end
2. Create a method to call on the mailer.
Say I am writing a news plugin for redmine.
I want to send an email which summarizes the article I submitted so that users do not have to poll the plugin each time they want to know if there is something new.
I create a method in my mailer class :
class MyPluginMailer < Mailer
def on_new_article(user_to_warn, article)
mail to: user_to_warn.email, subject: "New article: #{article.title}"
#article = article #So that #article will be available in the views.
end
end
You can call this method in your Article class in an after_create callback for example.
3. Create some views for the method.
I have to create 2 differents files :
my_method.html.erb
my_method.text.erb
or else redmine is going to crash with a "template not found" exception.
So in my redmine_folder/plugins/my_plugin/app/views/my_plugin_mailer/ I create
on_new_article.html.erb
on_new_article.text.erb
In my on_new_article.html.erb I write something like :
<h1><%= #article.title %></h1>
<p><%= #article.summary %></p>
I designed the infopath form. I am writing required programming code on button clicked event. But while publishing the infopath form i am getting error; Please observe: It should allow me to select "Form Library" option so that i can do. From Microsoft it is suggested from here that i need to remove code. but everything is required in my form. I need to deploy form with code. without code it is without any value.
I have associate tryst certificate as well as my form is with full trust.
My infopath services are configured properly.
I am running sharepoint2010 in 2-tier farm.
I am using Infopath 2010 with Sharepoint 2010.
What else i need to be added...?
If i removes code then it shows me and deployed properly.
Please , give me right direction.
**Edited:**
I deployed this form as form template and activated it by central admin site. and assigned to form library as content type. but while running this form (from Document-> New Document->MyContentTypeTemplate),
i got exception:
Business logic failed due to an exception.
(User: domainname\user, Form Name: MHPMEmployeeInformationTemplateChanged9, IP: , Request: http://spwfe1:7000/_layouts/FormServer.aspx?
XsnLocation=http://spwfe1:7000/FormServerTemplates/MHPMEmployeeInformationTemplateChanged9.xsn&SaveLocation=http:
//spwfe1:7000/OfficialResumeFormLibrary&Source=http://spwfe1:7000/OfficialResumeFormLibrary/Forms/AllItems.aspx&DefaultItemOpen=1, Form ID: urn:schemas-microsoft-com:
office:infopath:MHPMEmployeeInformationTemplateChanged9:-myXSD-2011-09-06T18-40-25, Type: UnauthorizedAccessException, Exception Message: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.) a2e8bb5f-26d2-485a-bf9c-0a333eaa71e7
Verbose Calling GlobalStorage.SetItem with index LastExceptionLogged value type UnauthorizedAccessException. a2e8bb5f-26d2-485a-bf9c-0a333eaa71e7
Medium Exception thrown from business logic event listener: System.UnauthorizedAccessException:
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
at EmployeeInformation_Template.DocGenerator.CreateWordDocument(Resume objResume, Object oTemplate)
at EmployeeInformation_Template.FormCode.GetInfopathData() at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at
Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at Employe... a2e8bb5f-26d2-485a-bf9c-0a333eaa71e7
Why should This? : I wondered When Microsoft is avoiding to use Interop COM Objects to use for word file automation which i used in my infopath form. Look Here
What i have to do now? do i need to go with alternatives ? or move by trying to resolve the issues ??? Please , i need right direction.
This is by design. As soon as you have code in your form, your only option is to deploy as "Administrator approved Form".
To get the form to show in your library, do the following:
Upload it in the Central Administration (General Applications
Settings -> Manage Form Templates)
activate the according Feature In the "Advanced Settings" section of
your library
allow "ContentType Management"
Add the Form as ContentType