Fork me on GitHub

All Tags:

mindset

devops

book

ci

communication

jenkins

自媒体

hometown

geek life

cloud

一封邮件的思考

30 Mar 2020

一封邮件的思考

组里来的新同事,要给国外的某位资深技术人员发一封邮件请求对方在某系统为其赋权。 谦逊的这位新同事在发送邮件之前,不忘请我帮忙Review一下他的草稿。

Jenkins Pipeline Email Notification

17 Feb 2020

Labs: Jenkins Pipeline Email Notification

Assume the Jenkins Server URL is “http://192.168.0.1:8080”.

Configure Email Notification

Navigate to {jenkins-server-url}/configure and scroll down to “E-mail Notification”.

Email SMTP Setting

Troubleshooting

  • Unable to send mail through smtp.gmail.com

    SMTPAuthenticationError: Username and Password not accepted

    Solution: Go to https://myaccount.google.com/security and enable “Access for less secure apps”.(启用安全性较低的应用的访问权限)

  • Unable to receive email

    Error sending to the following VALID addresses

    Received the email when manually trigger in the Jenkins, but failed in pipeline script.

    Solution:You should set SMTP Server and Authentication in both E-mail Notification and Extended E-mail Notification sections at “Jenkins’s URL” configure.

Pipeline Syntax to send email


  post {
      unsuccessful {
            echo 'Pipeline is unsuccessful!'
            emailext(subject: "Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' ",
            body: "Job '<${env.BUILD_URL}>' Unsuccessful.",
            from: '******@gmail.com',to: '******@outlook.com')
      }

      always {
            echo 'Pipeline Completed!'
      }

}

Mindset 2020

06 Feb 2020

Growth Mindset 2020

准备开始在微信公众号“对刘谈心”记录一个”观念改造”的系列。计划是每个月一篇,月底刊登。

观念改造记录这个月我看过的书或网页,遇见的人或事情对我个人的观念的改造,至少当下我比较认同的观念,朋友们一看,能够遇到某一条您也比较接受或认同的,我便心满意足。

如梦令.庚子鼠年春节

01 Feb 2020

如梦令.庚子鼠年春节

口罩封路闭户,干睡不觉腰酥。

晴空无霾无雾,渐多路人独步。

停住,停住,

继续隔离阻毒。

File Naming Convention

20 Nov 2019

File Naming Convention 文件命名规范