Jenkins

Problem with pulling docker images from gcr in kubernetes plugin / jenkins

谁说胖子不能爱 提交于 2020-04-18 06:03:55
问题 I have a gke cluster with a running jenkins master. I am trying to start a build. I am using a pipeline with a slave configured by the kubernetes plugin (pod Templates). I have a custom image for my jenkins slave published in gcr (private access). I have added credentials (google service account) for my gcr to jenkins. Nevertheless jenkins/kubernetes is failing to start-up a slave because the image can't be pulled from gcr. When I use public images (jnlp) there is no issue. But when I try to

How can I track a button click from a different UI?

 ̄綄美尐妖づ 提交于 2020-04-18 05:47:53
问题 I'm sorry if this question isn't framed the way it should, I have trouble wording out my problem. Is it possible to see which button the user clicked, if the button was on a different UI? I have a GSP page that is displaying a Jenkins Blue Ocean to monitor a pipeline. I want to track if the user has pressed any pause or abort buttons, but because the Jenkins Blue Ocean isn't part of my page, I can't send anything to my controller. Would there be any work arounds or methods to track something

Sending email from jenkins pipeline

萝らか妹 提交于 2020-04-18 05:35:49
问题 Hi I am trying to send email notification from jenkins pipeline but it is not sending any email. I am using the below script to send email: pipeline { agent any stages{ stage('Test'){ steps{ echo 'Ok' } } stage('Email'){ steps{ emailext (to: 'abc@xyz.com', replyTo:'abc@xyz.com', subject: "Email report from - '${env.JOB_NAME}'", body: 'test') } } } } The pipeline is being executed but I am not receiving any mail. 来源: https://stackoverflow.com/questions/60996636/sending-email-from-jenkins

为什么要用Kubernetes?

為{幸葍}努か 提交于 2020-04-18 04:33:39
1、前言   第一次接触Kubernetes是在2016年,再一次浏览博文的时候,那是我第一次听到Kubernetes这个名词,也是第一次认识了k8s这么一个东西。后来在慢慢了解它的时候,被它天生高可用、负载均衡、弹性计算、自动扩容缩容和全自动容灾机制的设计理念吸引,于是自己便踏入了k8s这条不归路,在调研学习的过程中,开始不断填坑、挖坑再填坑,周而复始。   2017年,公司还在使用裸Docker部署一些无状态的应用,随着越来越多的Docker实例,发生故障时,人工填坑的方式,让我们实在头疼,有时候大半夜正在做着美梦的时候,被一个电话铃喊起来处理着由于宿主机宕机或者网络不可达引起的各类问题。这种惨绝人寰的处理方式更是让我们头疼难忍。虽然后来引用了Swarm和Compose,但随着业务的不断增多,已经越来越来满足不了我们的应用场景,然后就想着把所有Docker应用迁移到Kubernetes中去管理。    2017年6月30日,k8s发布1.7版本,2017年10月,Docker拥抱Kubernetes,也是我们正式开始使用Kubernetes的开始。但事情并没有我们想象中的那么简单,k8s的设计太多复杂,概念实在是太多,搭建过程更是让人吐血,当时可参考的文章又是少之又少。在经过一个多月的研究与不断回血之后,终于在k8s集群中部署了我们的第一个应用。虽然整个过程中踩了无数坑

Jenkins pass value of Active Choices Parameter

99封情书 提交于 2020-04-17 22:51:58
问题 I have a jenkins job with "Active Choices Parameter" and "Active Choices Reactive Parameter". pipeline { agent { label 'Agent_Name' } stages { stage('Build') { steps { script { def res=build job: 'App_Build', parameters: [string(name: 'ActiveChoicesParam', value: 'Dev'),string(name: 'ActiveChoicesReactiveParam', value: 'Server1')] } } } } } I am trying to call the jenkins job and pass parameter values using pipeline script. However, I am getting the following error: The parameter

Jenkins pass value of Active Choices Parameter

落花浮王杯 提交于 2020-04-17 22:51:02
问题 I have a jenkins job with "Active Choices Parameter" and "Active Choices Reactive Parameter". pipeline { agent { label 'Agent_Name' } stages { stage('Build') { steps { script { def res=build job: 'App_Build', parameters: [string(name: 'ActiveChoicesParam', value: 'Dev'),string(name: 'ActiveChoicesReactiveParam', value: 'Server1')] } } } } } I am trying to call the jenkins job and pass parameter values using pipeline script. However, I am getting the following error: The parameter

jenkins 远程url构建。携带参数

廉价感情. 提交于 2020-04-16 16:45:56
【推荐阅读】微服务还能火多久?>>> php版本 post 增加安全 function curl_post($url, $post) { $options = array( CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $post, ); $ch = curl_init($url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书下同 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt_array($ch, $options); $result = curl_exec($ch); curl_close($ch); return $result; } 不带参数 <?php include_once "lib/fun.php"; $post_data['job'] = "job_name"; $post_data['token'] = "token"; $url = "http://ip/buildByToken/build"; echo curl_post($url,$post_data); ?>

jenkins 远程url构建。携带参数

守給你的承諾、 提交于 2020-04-16 15:34:26
【推荐阅读】微服务还能火多久?>>> php版本 post 增加安全 function curl_post($url, $post) { $options = array( CURLOPT_RETURNTRANSFER => true, CURLOPT_HEADER => false, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $post, ); $ch = curl_init($url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书下同 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt_array($ch, $options); $result = curl_exec($ch); curl_close($ch); return $result; } 不带参数 <?php include_once "lib/fun.php"; $post_data['job'] = "job_name"; $post_data['token'] = "token"; $url = "http://ip/buildByToken/build"; echo curl_post($url,$post_data); ?>

How to read the contents of /timestamps file in jenkins manually

。_饼干妹妹 提交于 2020-04-16 08:18:28
问题 I am trying to read the /timestamps file that gets generated for the build but I am not able to understand the file format as when I try to open it is contains some special characters. I wanted to use this file for a script which will run as a batch command after the build has completed. Any help would be appreciated. Thanks 回答1: It is considered bad practice to rely of the internal data-structure of a plugin like this. Suggest you contact the writer of that plugin and see if he can give some

While running a build inside Jenkins, I am getting “java/lang/OutOfMemoryError”

拈花ヽ惹草 提交于 2020-04-16 05:45:33
问题 2020-02-25 10:11:24.986+0000 [id=79] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Started maven-repo-cleanup 2020-02-25 10:11:25.004+0000 [id=79] INFO hudson.model.AsyncPeriodicWork#lambda$doRun$0: Finished maven-repo-cleanup. 14 ms JVMDUMP039I Processing dump event "systhrow", detail "java/lang/OutOfMemoryError" at 2020/02/25 16:31:47 - please wait. JVMDUMP032I JVM requested System dump using 'C:\Users\KumariRupam\Documents\jenkins\core.20200225.163147.3284.0001.dmp' in response to an