how pass email in jenkins in run time through Variable - email

I am facing below problem,Appreciate if any one help
I am having jenkin job which will trigger java jar contains code to read the email from excel and the same email to be passed in jenkins for sending email in username field.
Thanks

Did you take a look at parameterized jobs (If you want to manually trigger it)?
If, you want to read from excel and pass to another job please take a look at this.

I'm trying to understand your problem:
1. Jenkins to trigger emails to DevOps team that the deployment task results
2. Application to trigger emails that the application is being deployed successfully (Or any other scenarios you want to achieve, please indicate, and I will try to enhance this post)
If above is the case, you should try to utilize Jenkins to complete the full process: build, test, deploy and verify, then consolidate the results then send out via email
It's a clear cut that Jenkins for deployment and app for business
There are different ways to verify your application is deployed successfully depends on how you identify if app deployment is successful.
Jenkins can detect those signals, e.g. send a ping or curl to the application and verify the response
Now only Jenkins needs to know the list of emails address for the deployment results, you can use parameterized jobs as #Avneesh Srivastava mentioned

Related

Why I can't deploy program on Solana Mainnet?

Nowadays, I tried to deploy smart contract on Mainnet but I cant deploy it successfully.
why? and how can I deploy program on mainnet?
The current tools perform a fee check on every single message sent to deploy the program, which can make things take much longer and timeout many of the signed transactions.
As a temporary workaround, if you're sure the funding account has enough SOL, you can use:
solana program deploy --skip-fee-check <rest of your parameters here

Capturing error logs in the email notification while deploying through octopus deploy

I am using octopus deploy automation tool(V2020 1.14) for deploying my code.Email configuration through SMTP is already configured. Now while email is sent it should have the complete error log in case if deployment is failed at certain step. Could you please share me some thoughts how to do this ???
There's a couple of things you could do here but the first thing that comes to mind is this example here which logs the error and error detail for each step that failed in a deployment.
To extend this further you could add a link to the full deployment log in the email by using other Octopus system variables. To create a link to the deployment the email step is running I've created an example below.
#{Octopus.Web.ServerUri}/app#/#{Octopus.Space.Id}/projects/#{Octopus.Project.Id}/releases/#{Octopus.Release.Number}/deployments/#{Octopus.Deployment.Id}?activeTab=taskSummary
Hopefully, this answers your question but if you need further information let me know.

Can I re-run a Power Automate flow instance from history?

Is there any way to find and re-run an earlier instance of a Power Automate workflow programmatically?
I can do this manually: download the .csv file containing the instances, search in the Trigger output column the one I want, get the id, copy-paste the run URL, and click resubmit.
I tried with Power Automate itself:
The built-in Flow Management connector supports only to find a specific flow by name, and does not even go to the history.
PowerShell:
Installed the PowerApps module, I can list the instances with
Get-FlowRun -FlowName {flow name}
But I don't see the same properties as in the exported .csv file, and there's also no Run-Flow command that would let me run it.
So, I am a little stuck here; could someone please help me out?
We cannot programmatically resubmit the Flow run from the history with PowerShell or by any other api method yet.
But can avoid some manual work by using workflow function in a Flow compose step, we can automate the composition of Flow history run url. Read more
https://xxx.flow.microsoft.com/manage/environments/07aa1562-fea6-4583-8d76-9a8e67cbf298/flows/141e89fb-af2d-47ac-be25-f9176e64e9a0/runs/08586722084717816659969428791CU12?backUrl=%2Fflows%2F141e89fb-af2d-47ac-be25-f9176e64e9a0%2Fdetails&runStatus=Failed
There are 3 guids that I need to find aso that I can build up the flow history url.
The first guid is my environmentName (07aa1562-fea6-4583-8d76-9a8e67cbf298), then I’ve got the flow name ( 141e89fb-af2d-47ac-be25-f9176e64e9a0) and finally the run (08586722084717816659969428791CU12).
There is a cmdlet from Microsoft 365 CLI to resubmit a flow run
m365 flow run resubmit --environment flowEnvironmentID --flow flowGUID --name flowRunID –confirm
You can also resubmit a flow run using Power Automate REST API
https://api.flow.microsoft.com/providers/Microsoft.ProcessSimple/environments/{FlowEnvironment}/flows/{FlowGUID}/triggers/manual/histories/{FlowRunID}/resubmit?api-version=2016-11-01
For the Power Automate REST API, you will have to pass an authorization token.
For more information, go through the following post
https://ashiqf.com/2021/05/09/resubmit-your-failed-power-automate-flow-runs-automatically-using-m365-cli-and-rest-api/

Send mail from EC2 or EMR on AWS

Is there any way to Send mails with Reports attached from EMR?
I am using Amazon Web Services. I don't want to write a script inside EC2 to fetch data from EMR, add it on cron, then send the mails daily. Any luck, there is already any Jobs Scheduler from Amazon to automate this?
Problem:
Implement daily job to generate .csv/.xls files on top of Hive
Send the report in email
Thanks in advance!
If you use AWS Data pipeline (and use EMR as a node inside it), it has OnSuccees and OnFailure alarm support. In the alarm you can configure to send email to you.
http://aws.amazon.com/datapipeline/faqs/ (look for "How do I add alarms to an activity?").
You cant but customize the email content. May be you can keep the CSVs in a predesignated location with some time/date based naming convention. This way when you get the success mail, you know where to look into for the record.
All this you can do without writing any extra code (just configurations).
One alternative is to setup Oozie in your EMR cluster and create a workflow that sends email through Amazon SES.
You can read up more on Oozie on their open source page:
https://oozie.apache.org/
You might find this helpful too:
https://github.com/lila/emr-oozie-sample
and finally Amazon SES:
http://aws.amazon.com/ses/

How to make Jenkins send email for an external test

I'm not entirely sure where to start. Someone told me I could have Jenkins monitor one of our web services and that if it detects the service is down, to have Jenkins send an email alerting us.
I created a "Monitor an external job" job in Jenkins. I setup the remote server to send the output of the monitoring script to this job name in Jenkins. We can see the results on the screen when it runs. The problem is, "Monitor external job" doesn't have the nice options that Freestyle job has, meaning, it doesn't let me select Email notification or what not for me to setup to send an email if the service is down.
Can anyone point me in the right direction? How do I get Jenkins to check the output of a remote job and send an email if it fails? Am I even going about this the right way? Is creating a "Monitor an external job" the correct way to solve this problem? What plugins, other than the email-ext plugin is required to do this job? Thanks in advance for your help.
I'm using http://wiki.jenkins-ci.org/display/JENKINS/HTTP+Request+Plugin to monitor whether some websites are up or down. You can set it to 'Fail the build' and set up a 'Post-build Action' 'Email Notification'.
Another option could be to setup an 'Execute shell' Build step, and curl a request to your web service, and check the response.