jenkins-plugins

how to get all the jenkins users through api

好久不见. 提交于 2021-01-01 06:44:22
问题 I'm trying to get all the user in jenkins by using api . For example I hit the following command in postman and it is showing me all the jobs in jenkins . Url = 192.168.195.150:8080/api/json?pretty=true Result: { "_class": "hudson.model.Hudson", "assignedLabels": [ { "name": "master" } ], "mode": "NORMAL", "nodeDescription": "the master Jenkins node", "nodeName": "", "numExecutors": 2, "description": null, "jobs": [ { "_class": "hudson.model.FreeStyleProject", "name": "Apache_kafka_Consumer

how to get all the jenkins users through api

回眸只為那壹抹淺笑 提交于 2021-01-01 06:44:13
问题 I'm trying to get all the user in jenkins by using api . For example I hit the following command in postman and it is showing me all the jobs in jenkins . Url = 192.168.195.150:8080/api/json?pretty=true Result: { "_class": "hudson.model.Hudson", "assignedLabels": [ { "name": "master" } ], "mode": "NORMAL", "nodeDescription": "the master Jenkins node", "nodeName": "", "numExecutors": 2, "description": null, "jobs": [ { "_class": "hudson.model.FreeStyleProject", "name": "Apache_kafka_Consumer

how to get all the jenkins users through api

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-01 06:43:54
问题 I'm trying to get all the user in jenkins by using api . For example I hit the following command in postman and it is showing me all the jobs in jenkins . Url = 192.168.195.150:8080/api/json?pretty=true Result: { "_class": "hudson.model.Hudson", "assignedLabels": [ { "name": "master" } ], "mode": "NORMAL", "nodeDescription": "the master Jenkins node", "nodeName": "", "numExecutors": 2, "description": null, "jobs": [ { "_class": "hudson.model.FreeStyleProject", "name": "Apache_kafka_Consumer

How can I use `def` in jenkins pipeline

别等时光非礼了梦想. 提交于 2020-12-28 18:26:43
问题 I am learning jenkins pipeline, and I tried to follow this pipeline code. But my jenkins always complain that def is not legal. I am wondering did I miss any plugins? I already installed groovy , job-dsl , but doesn't work. 回答1: As @Rob said, There are 2 types of pipelines: scripted and declarative . It is like imperative vs declarative . def is only allowed in scripted pipeline or wrapped in script {} . Scripted pipeline (Imperative) Start with node , and def or if is allowed, like below. It

How to cleanup pipeline before checkout of repository in Jenkinsfile

末鹿安然 提交于 2020-12-12 11:39:48
问题 I want to make a clean before checkout operation which is described in Jenkins git plugin documentation: Clean before checkout Clean the workspace before every checkout by deleting all untracked files and directories, including those which are specified in .gitignore. ... But how can add this option to default checkout step which is doing as first step? I feel that it should be an option extended by git plugin which can be included to options block of Jenkinsfile as described in docs: The

Get SSH slave node hostname/IP in Jenkins pipeline

梦想与她 提交于 2020-12-12 08:29:16
问题 I'm using SSH slaves as nodes in a Jenkins pipeline script. Is there a way to fetch the hostname/IP of the node inside the pipeline (Jenkinsfile) script ? I'm deploying to a parameterized node and would like to echo the IP of the node at the end of the script. i.e: node('master') { checkout scm stash name: 'deploy', includes: 'modules/ci/,modules/compose/' } stage ('Deploy to remote server (SSH)') { node(${NODE}) { unstash 'deploy' withEnv(["BRANCH=${BRANCH}"]) { sh "chmod +x modules/ci

Get SSH slave node hostname/IP in Jenkins pipeline

[亡魂溺海] 提交于 2020-12-12 08:28:48
问题 I'm using SSH slaves as nodes in a Jenkins pipeline script. Is there a way to fetch the hostname/IP of the node inside the pipeline (Jenkinsfile) script ? I'm deploying to a parameterized node and would like to echo the IP of the node at the end of the script. i.e: node('master') { checkout scm stash name: 'deploy', includes: 'modules/ci/,modules/compose/' } stage ('Deploy to remote server (SSH)') { node(${NODE}) { unstash 'deploy' withEnv(["BRANCH=${BRANCH}"]) { sh "chmod +x modules/ci

Is there any way to get Gitlab pipeline artifacts in Jenkins?

主宰稳场 提交于 2020-12-12 02:06:43
问题 I have a project in gitlab. The project gets built for every check-in in the repo and build artifacts are created when the gitlab pipeline is successful. I want to get these build artifacts in my jenkins pipeline job. Is there any way to do that? I couldn't find any plugin in Jenkins to do this. Any help is appreciated. 回答1: The GitLab API offers this with both complete artifacts package (zip) and single files. You need a GitLab token which you can add as a Credential (secret text) and the

Is there any way to get Gitlab pipeline artifacts in Jenkins?

允我心安 提交于 2020-12-12 02:05:19
问题 I have a project in gitlab. The project gets built for every check-in in the repo and build artifacts are created when the gitlab pipeline is successful. I want to get these build artifacts in my jenkins pipeline job. Is there any way to do that? I couldn't find any plugin in Jenkins to do this. Any help is appreciated. 回答1: The GitLab API offers this with both complete artifacts package (zip) and single files. You need a GitLab token which you can add as a Credential (secret text) and the

Is there any way to get Gitlab pipeline artifacts in Jenkins?

早过忘川 提交于 2020-12-12 02:04:54
问题 I have a project in gitlab. The project gets built for every check-in in the repo and build artifacts are created when the gitlab pipeline is successful. I want to get these build artifacts in my jenkins pipeline job. Is there any way to do that? I couldn't find any plugin in Jenkins to do this. Any help is appreciated. 回答1: The GitLab API offers this with both complete artifacts package (zip) and single files. You need a GitLab token which you can add as a Credential (secret text) and the