Jenkins configuration

本文档指导如何设置GitLab webhook以触发Jenkins pipeline,并展示了Jenkins REST API的URL格式。同时,解释了在不升级Jdk的情况下使用SonarQube进行分析的方法,通过指定Jdk11路径来运行SonarQube扫描。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

When you try to setup webhook from gitlab, please refer: https://github.com/jenkinsci/gitlab-plugin

URL of Jenkins Rest API looks like https://JENKINS_URL/job/YOUR_JOB/job/123456

you need to replace all jobs in url and insert one "project" like https://JENKINS_URL/project/YOUR_JOB/123456

To make the Intellij Idea to show auto completion popup, you can do as following:

1. Download and install groovy.

2. In Idea settings->File Type, associate the Jenkinsfile with groovy.

3. Go to Jenkins website, access

http://{YOUR_JENKINS_ADDRESS}/job/{YOUR_PIPELINE_JOB}/pipeline-syntax/gdsl

 4. Copy out the content and create a file pipeline.gdsl in the Idea project.

Sonarqube now only allows to run with Jdk 11, if your project is still built with Jdk1.8, how to use Sonarqube without upgrade Jdk?

Let's suppose Jdk 11 is already installed in the Jenkins agent. When you try to run the mvn sonar:sonar ..., you can add export JAVA_HOME=/path/to/jdk11 before mvn sonar:sonar... like this

sh "export JAVA_HOME=/path/to/jdk11; mvn sonar:sonar ..."
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值