groovy

On a build of a Jenkins job, is it possible to change build parameters midway through?

不问归期 提交于 2021-01-18 08:44:01
问题 We are using Jenkins to automate several of our build and test processes. For some of our process, the engineer starting the build needs to specify a parameter. But the range of possible and optimal values for that parameter change throughout the course of the day. What I would like to do is let the engineer specify a value - if they know an optimal value - or leave it blank and have a value be calculated by an early build step. If the value is calculated, I would like the calculating build

On a build of a Jenkins job, is it possible to change build parameters midway through?

假如想象 提交于 2021-01-18 08:43:17
问题 We are using Jenkins to automate several of our build and test processes. For some of our process, the engineer starting the build needs to specify a parameter. But the range of possible and optimal values for that parameter change throughout the course of the day. What I would like to do is let the engineer specify a value - if they know an optimal value - or leave it blank and have a value be calculated by an early build step. If the value is calculated, I would like the calculating build

Jenkins系列视频~Jenkins 共享库的基础使用

大憨熊 提交于 2021-01-14 18:53:11
Jenkins系列视频教程火热制作中,每周二发布( 关注 Jenkins 中文社区哔哩哔哩,查看完整的视频 )。 本视频中,介绍 Jenkins Shared-library 共享库的基本使用 概述 Jenkins shared-library 也就是流水线共享库,使用 Groovy 编写,用于封装 Jenkins 流水线(Pipeline)脚本(Jenkinsfile)中的通用逻辑。更多描述,请查看 Jenkins 官方文档。 为什么? 在企业中,通常有很多项目的构建、发布过程是非常相似的。有统一的软件构建、发布流程,对于提高团队效率,减少不必要的面对面沟通的重要手段。但,随之而来的一个问题是: 需要维护很多流水线脚本 流程上一旦有改动,就需要对很多项目进行修改 部分情况下,流水线的维护者和项目的开发者不在一个团队,从而没有修改代码库的权限 对于以上所描述的情况,相信很多人都能想到,我们需要一个集中存放流水线脚本的地方。例如:有人希望可以把流水线脚本(Jenkinsfile)存放到一个 HTTP 服务器上,让每个项目都使用这个服务器上的脚本。 但是,我想说的是:千万不要把你们团队的软件构建、发布脚本随随便便扔一个地方了事。如果你认为这些脚本就是一些普通的文本文件,那么你就错了。正是这些脚本很大程度上影响着团队的项目迭代效率

How to save a dbf file in groovy or java?

雨燕双飞 提交于 2021-01-07 05:06:49
问题 In one of the questions regarding DBF creation, I found the code below. Did I understand correctly that a DBF file is created here with the names of the columns and the values that will be returned as a result of executing the SQL query? Does println do DBF output? And if everything is so, then how to save the resulting DBF file (name.dbf)? I'm confused and can't figure it out with DBF. I need to create a DBF file and fill it with values by accessing a function in a SQL package. The second

How to save a dbf file in groovy or java?

微笑、不失礼 提交于 2021-01-07 05:05:43
问题 In one of the questions regarding DBF creation, I found the code below. Did I understand correctly that a DBF file is created here with the names of the columns and the values that will be returned as a result of executing the SQL query? Does println do DBF output? And if everything is so, then how to save the resulting DBF file (name.dbf)? I'm confused and can't figure it out with DBF. I need to create a DBF file and fill it with values by accessing a function in a SQL package. The second

Jenkins Active Choices Parameter with Docker to get Azure tags

不羁岁月 提交于 2021-01-07 02:47:03
问题 For deployment jobs, I want to set up a Jenkins job which receives all existing tags from a specific Azure repository and makes them available for selection in an Active Choices parameter. I tried several things but nothing has worked. In the code below you can see the last code with which I tried. I want to pull a Docker container which has our Azure CLI and our config in it, after that I want to access the container and start an Azure command (which is not in the code yet, as it fails prior

How to deploy on Heroku a Gradle Spring Boot app, with dependency on a local Library project?

穿精又带淫゛_ 提交于 2021-01-07 02:16:53
问题 Let's say I have a Gradle Multi project with 2 subprojects, :profile and :commons . :commons is a Library project, and :profile is a Spring Boot app, with details below: # profile/build.gradle ... dependencies { implementation project(':commons') ... } ... And # profile/settings.gradle rootProject.name = 'profile' include ":commons" project(':commons').projectDir = new File('../commons') Obviously, when I push to Heroku I have the error below: FAILURE: Build failed with an exception. remote:

Date.plus not working in 2.5.4 Groovy Runtime, what is the alternative?

旧街凉风 提交于 2021-01-05 13:19:04
问题 We want to add days to the current date and format it in a specific way. This was solved in Groovy 2.4.13 and the following date manipulation works fine: ​today = new Date()+90;today.format('yyyy-MM-dd HH:mm:ss.S'); Result: 2019-12-02 08:07:15.294 In Groovy 2.5.4 the same expression throws this exception: groovy.lang.MissingMethodException: No signature of method: java.util.Date.plus() is applicable for argument types: (Integer) values: [90] Possible solutions: parse(java.lang.String), split

Date.plus not working in 2.5.4 Groovy Runtime, what is the alternative?

夙愿已清 提交于 2021-01-05 13:18:28
问题 We want to add days to the current date and format it in a specific way. This was solved in Groovy 2.4.13 and the following date manipulation works fine: ​today = new Date()+90;today.format('yyyy-MM-dd HH:mm:ss.S'); Result: 2019-12-02 08:07:15.294 In Groovy 2.5.4 the same expression throws this exception: groovy.lang.MissingMethodException: No signature of method: java.util.Date.plus() is applicable for argument types: (Integer) values: [90] Possible solutions: parse(java.lang.String), split

Lock contention in Groovy Shell interpreter under high load

大憨熊 提交于 2021-01-05 09:36:24
问题 We are evaluating GroovyShell interpreter (v2.4) in our application for dynamically executing standard Java syntax. Earlier, we were using Java BeanShell Interpreter for it, but it has an issue under high load which prompted us to look for an alternative such as Groovy. Sample Java Code static String script = "int y = x * x; System.out.println(\"** value of y ** :: \" + y ); "; GroovyShell gs = new GroovyShell(); Script evalScript = gs.parse("void evalMethod() {" + script + "}"); // bind