Jenkins

Set 24-hour clock format in Jenkins

╄→尐↘猪︶ㄣ 提交于 2021-02-06 08:40:06
问题 Despite the fact that in http://<jenkins server>/systemInfo the user.timezone property value meets my actual time zone I still have 12-hour clock format. I would like to have 24-hour clock format instead. Does anyone have any ideas how it can be changed in Jenkins? Thank you. 回答1: As @Arkain mentioned, you should specify in browser's settings the language which suits your intended time format. I had both English (US) and just English (which I thought was English (GB)), but then I realized

jenkins执行shell命令修改不了目录的问题

前提是你 提交于 2021-02-05 14:43:26
jenkins默认是有一个当前目录作为运行环境,执行的操作均基于此目录,如果创建的jenkins项目是free style的,如果要执行远程命令,就不方便修改执行目录了。 例子:如果想通过jenkins执行一个sh脚本,里面有cd命令,项目是free style的,则用exectue command over ssh,会出一build不结束的现象。原因就是sh里不能出现cd命令去修改当前执行的目录。 要如何解决这个问题呢? 1种可选的方案是使用pipeline项目,用dir(目录){}代码来限制。但是pipeline使用上稍复杂,这里只是简单的执行一个命令,有点不太必要。 2种方案是使用嵌套sh调用。即jenkins执行一个简单的脚本,这个脚本再调用真正执行的脚本。其本质上是重新执行一个后台任务。如 jenkins.sh #/bin/bash nohup /dir/another.sh >/dev/null 2>&1 exit 0 another.sh才是真正的脚本,里面可以使用任何命令了。 来源: oschina 链接: https://my.oschina.net/swingcoder/blog/4946527

Team Foundation Server plugin is not available in Jenkins

大憨熊 提交于 2021-02-05 12:11:21
问题 The Team Foundation Server plugin is not available in Jenkins. The Jenkins official page shows the message: Distribution of this plugin has been suspended due to unresolved security vulnerabilities Is there any alternative to this plugin using which I can integrate Team Foundation Server with Jenkins? 回答1: MS have effectively abandoned support for TFVC and for the plugin. You can still grab the plugin from the GitHub TFS pulgin releases page and upload manually. ( {JENKINS_URL}/pluginManager

Team Foundation Server plugin is not available in Jenkins

南笙酒味 提交于 2021-02-05 12:09:31
问题 The Team Foundation Server plugin is not available in Jenkins. The Jenkins official page shows the message: Distribution of this plugin has been suspended due to unresolved security vulnerabilities Is there any alternative to this plugin using which I can integrate Team Foundation Server with Jenkins? 回答1: MS have effectively abandoned support for TFVC and for the plugin. You can still grab the plugin from the GitHub TFS pulgin releases page and upload manually. ( {JENKINS_URL}/pluginManager

Define and access a variable in multiple steps of a jenkins pipeline

徘徊边缘 提交于 2021-02-05 11:16:48
问题 I came here from this post Defining a variable in shell script portion of Jenkins Pipeline My situation is the following I have a pipeline that is updating some files and generating a PR in my repo if there are changes in the generated files (they change every couple of weeks or less). At the end of my pipeline I have a post action to send the result by email to our teams connector. I wanted to know if I could somehow generate a variable and include that variable in my email. It looks

Define and access a variable in multiple steps of a jenkins pipeline

浪尽此生 提交于 2021-02-05 11:16:17
问题 I came here from this post Defining a variable in shell script portion of Jenkins Pipeline My situation is the following I have a pipeline that is updating some files and generating a PR in my repo if there are changes in the generated files (they change every couple of weeks or less). At the end of my pipeline I have a post action to send the result by email to our teams connector. I wanted to know if I could somehow generate a variable and include that variable in my email. It looks

iOS Jenkins+蒲公英实现持续集成

泪湿孤枕 提交于 2021-02-05 10:42:03
随着项目的迭代速度不断加快,原始的使用xcode -> product -> archive 的方式已经不能满足迭代需要。还要现在已经有比较成熟的 Jenkins + 蒲公英持续集成方案。最近学习研究学了下这个方案。林林总总,遇到许多坑也学习到很多 。这里把直接把正确的方向分享记录下来 。方便下次再配置环境的时候可以一步到位,直取敌首。 如果从官网下载安装jenkins的apk包,会默认安装的 /Users/Shared/jenkins 目录下。安装在这个目录下我们使用 jenkins账户访问主账户资源的时候会遇到各种权限问题,我遇到的就是:在jenkins配置页面执行shell脚本的时候提示 permission denied,原因可能是jenkins安装在这个目录下无权访问主账户的某些文件 。 个人也尝试了网上大部分的通过命令行修改jenkins用户组的方法,效果并不理想(也可能是我操作方式不对 )。 如果能把jenkins安装在主账户的某个目录下不就是可以解决这个问题了么,从这个角度出发,于是有了下面一种比较好的解决方法 。 通过homebrew安装而不是apk包 。首先你要安装homebrew 。 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Jenkins Triggering of a Build Step/Stage(not the entire job) at a given interval

自古美人都是妖i 提交于 2021-02-05 09:45:34
问题 I am trying to build a pipeline where i would need to chain multiple jobs and some of them has to start at a certain time. Ex: Job1(starts at Midnight) -> Job2 -> Job3 ->Job4(starts at 4 PM) Using Declarative Syntax: pipeline { agent any stages{ stage('Fetch Latest Code-1') { steps{ build job: 'Get Latest - All Nodes', quietPeriod: 60 } } stage('CI Day - 1') { parallel { stage('ANZ CI'){ steps{ build job: 'ANZ - CI', quietPeriod: 120 } } stage('BRZ CI'){ steps{ build job: 'BRZ_CI',

Jenkins pipeline自动打包iOS

泪湿孤枕 提交于 2021-02-05 09:28:29
pipeline { agent { label 'MacOS' } parameters { choice choices: ['AdHoc', 'AppStore', 'Development'], description: '请选择对应功能:1-正式本地安装 2-苹果开发者包 3-测试版本', name: 'FUNCTION' // extendedChoice description: '请选择构建环境', multiSelectDelimiter: ',', name: 'envs', propertyFile: '/data/jksconf/jkslist', propertyKey: 'envs', quoteValue: false, saveJSONParameterToFile: false, type: 'PT_SINGLE_SELECT', visibleItemCount: 5 gitParameter branch: '', branchFilter: '.*', defaultValue: 'origin/master', description: '代码分支', name: 'project', quickFilterEnabled: false, selectedValue: 'NONE', sortMode: 'NONE', tagFilter:

How to Direct the Cmd line output to jenkins

风流意气都作罢 提交于 2021-02-05 07:41:19
问题 Stage("execution") { Steps { bat 'start cmd.exe /c c:\\users\\doc\\sample.bat' } } The above script is just opening the cmd prompt and executing it. It's not taking the output of the execution. Even if the execution fails, the stage is shown as successful and it moves to the next stage for deployment. I want to develop it so that the output in the cmd prompt should be taken as input by Jenkins and stage should go on. If the stage fails during execution, the stage should show failure and if