hudson

Jenkins stapler requests fail with no valid crumb

女生的网名这么多〃 提交于 2021-02-07 14:44:38
问题 I'm working on a Jenkins plugin and I'm now stuck at a point where I'm trying to get the return value of a method using a JavaScript proxy as described here. I simply want to call this kotlin method: @JavaScriptMethod fun getMonitoredJobsAsJSON(): JSONArray = toJSON(getObjectMapper().writeValueAsString(getMonitoredJobs())) as JSONArray From the jelly script using this: <script> var board = <st:bind value="${it}"/> board.getMonitoredJobsAsJSON(function(data) { // }) </script> This actually

Jenkins stapler requests fail with no valid crumb

两盒软妹~` 提交于 2021-02-07 14:42:05
问题 I'm working on a Jenkins plugin and I'm now stuck at a point where I'm trying to get the return value of a method using a JavaScript proxy as described here. I simply want to call this kotlin method: @JavaScriptMethod fun getMonitoredJobsAsJSON(): JSONArray = toJSON(getObjectMapper().writeValueAsString(getMonitoredJobs())) as JSONArray From the jelly script using this: <script> var board = <st:bind value="${it}"/> board.getMonitoredJobsAsJSON(function(data) { // }) </script> This actually

Jenkins/Hudson CLI API to modify the node labels using Groovy

不问归期 提交于 2021-02-07 05:31:51
问题 Does anyone know how to modify the Jenkins/Hudson node labels in a non-manually way? I mean, thorough an API like the CLI API that this tool offers (without restarting Jenkins/Hudson of course). My guess is that the best option is using a Groovy script to enter into the Jenkins/Hudson guts. Executing something like: java -jar -s HUDSON_URL:8080 groovy /path/to/groovy.groovy Being the content of that script something like: for (aSlave in hudson.model.Hudson.instance.slaves) { labels = aSlave

How to get a reference to form elements in a Jenkins jelly script for a Builder configuration when the form loads?

蹲街弑〆低调 提交于 2021-01-29 02:12:01
问题 I am writing a Jenkins Builder, and in the jelly script for its configuration in the build configuration page I have some Javascript that I want to run when the form is loaded, to do a server lookup and get some information to help the user out with their configuration, which will also be performed when the user changes the form's values. Previously I have got references to the form elements by passing this in to functions in onchange or onkeyup attributes. However, now I want to run some

How to get a reference to form elements in a Jenkins jelly script for a Builder configuration when the form loads?

坚强是说给别人听的谎言 提交于 2021-01-29 02:11:32
问题 I am writing a Jenkins Builder, and in the jelly script for its configuration in the build configuration page I have some Javascript that I want to run when the form is loaded, to do a server lookup and get some information to help the user out with their configuration, which will also be performed when the user changes the form's values. Previously I have got references to the form elements by passing this in to functions in onchange or onkeyup attributes. However, now I want to run some

Trigger Jenkins Job only when changes happen to a particular branch

寵の児 提交于 2021-01-28 03:01:41
问题 I have configured a jenkins job and I wish it should be triggered when I make some changes to the Github for that particular branch. I use the Github plugin and has enabled "build when a change is pushed to github". But this option is triggering my Job if someone else create a separate branch and push to that branch. Let me explain it below: Change pushed to branch "release" Jenkins notified and job executes - Expected behavior Another change is now pushed to branch "xyz" but I don't intend

SQLZOO翻译及其代码答案(2021/1/17更)

耗尽温柔 提交于 2021-01-19 12:57:00
SQL入门小白的练习作业整理(●’◡’●) 目录 0 SELECT basics 1 SELECT names 2 SELECT from World 3 SELECT from Nobel 4 SELECT within SELECT 5 SUM and COUNT 6 JOIN 7 More Join operations 0 SELECT basics 表: world(name,continent.area,population,gdp,capital) #1(考察where) 列出德国的人口 SELECT population FROM world WHERE name = 'Germany' ; #2(考察in) 列出’Sweden’, ‘Norway’ 和 'Denmark’地区的名字和人口 SELECT name , population FROM world WHERE name IN ( 'Sweden' , 'Norway' , 'Denmark' ) ; #3(考察between) 列出面积为200000-250000之间的国家名和面积 SELECT name , area FROM world WHERE area BETWEEN 200000 AND 250000 ; 1 SELECT names 表: world(name,continent.area

Hudson+svn+ant+tomcat一键自动化部署

蓝咒 提交于 2020-12-30 11:36:38
准备工作 安装 jdk 下载 http://hudson-ci.org/ 下载 svn 下载 ant http://ant.apache.org/ 下载 tomcat Hudson 启动及插件初始化 启动 Hudson 的 war 包扔到 tomcat 里,启动 tomcat 访问 http://localhost:8080/hudson/ 出现如下界面,成功 初始化 svn 插件 初始化 Hudson SSH plugin ant 配置 Windows ANT_HOME=D:\apache-ant-1.9.4 Path 中加入如下内容 ;%ANT_HOME%\bin;%ANT_HOME%\lib; 配置成功: Ant 过程中 Java heap space 解决办法如下: ant.bat 文件中配置 jvm 内存 set ANT_OPTS=-Xms128m -Xmx256m -verbosegc set ANT_OPTS=-Xms256m -Xmx512m -verbosegc -verbosegc 可以查看 Java 使用的堆内存的情况 Linux 解压缩 apache-ant-1.9.4-bin.tar.gz tar zxvf apache-ant-1.9.4-bin.tar.gz 在 /etc/profile 配置环境变量 ANT_HOME=D:\apache-ant-1

什么是 CI/CD?

爱⌒轻易说出口 提交于 2020-12-18 01:52:35
本文转载自: Jenkins 中文社区 CI/CD 的出现改变了开发人员和测试人员发布软件的方式。本文是描述这一变化的系列文章第一篇, 这些文章将提供各种工具和流程的讲解,以帮助开发人员更好的使用 CI/CD。 从最初的 瀑布模型 , 到后来的 敏捷开发 , 再到今天的 DevOps , 这是现代开发人员构建出色产品的技术路线。 随着 DevOps 的兴起,出现了持续集成,持续交付(CI/CD)和持续部署的新方法, 而传统的软件开发和交付方式在迅速变得过时。过去的敏捷时代里, 大多数公司的软件发布周期是每月、每季度甚至每年(还记得那些日子吗?), 而在现在 DevOps 时代,每周、每天甚至每天多次都是常态。 当 SaaS 成为业界主流后尤其如此,您可以轻松地动态更新应用程序, 而无需强迫用户下载更新组件。很多时候,用户甚至都不会注意到正在发生变化。 开发团队通过软件交付流水线(Pipeline)实现自动化,以缩短交付周期, 大多数团队都有自动化流程来检查代码并部署到新环境。 我们一直在关注自动化测试流程,但这将在之后的文章中介绍。 今天,我们将介绍什么是 CI/CD/CD ,以及现代软件公司如何使用工具将部署代码的流程自动化。 持续集成 注重将各个开发者的工作集合到一个代码仓库中,通常每天会进行几次, 主要目的是尽早发现集成错误,使团队更加紧密结合,更好地协作。 持续交付

Jenkins RCE漏洞分析汇总

孤人 提交于 2020-12-12 02:36:49
No.1 声明 由于传播、利用此文所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,雷神众测以及文章作者不为此承担任何责任。 雷神众测拥有对此文章的修改和解释权。如欲转载或传播此文章,必须保证此文章的完整性,包括版权声明等全部内容。未经雷神众测允许,不得任意修改或者增减此文章内容,不得以任何方式将其用于商业目的。 No.2 前言 之前针对Jenkins没注意看过,看到廖师傅kcon会议上讲的Java沙箱逃逸就涉及到了Jenkins,包括今年开年时候orange发的Jenkins的组合拳,拖拖拉拉到了年底还没看,所以准备开始看。 这里根据Jenkins的漏洞触发点做了一个归类,一种是通过cli的方式触发,一种是通过我们常见的http方式触发。 No.3 环境搭建 在catalina.sh添加,或者catalina.bat内容不动用如下命令开启,默认是开启8000端口 用如下命令开启 catalina.bat jpda start(Windows) catalina.sh jpda start(linux) No.4 漏洞分析 1.Cli方式触发 CVE-2015-8103 最早开始公开Java 反序列化的时候,何使用 Apache Commons Collections 这个常用库来构造 POP 链(类ROP链),这个在Jenkins上的例子就是这个编号