Jenkins

How to pass dynamic values to an environment block during the pipeline execution in Jenkins?

人盡茶涼 提交于 2020-05-17 07:12:05
问题 This is related to one question I asked before: Using groovy to parse JSON object in shell scripts for Jenkin basically I will need to pass a dynamic value as returned from sh scripts to an environment block, so that the following stage can re-use that value and pass the version as a label to JIRA plugin called Xray. But I aware that I cannot pass dynamic values to an environment block during the pipeline execution. So, I think I am going to need try a different route for that, not sure if

Jenkins Declarative pipeline get build failure cause

微笑、不失礼 提交于 2020-05-17 05:51:30
问题 I recently converted a scripted pipeline into a declarative pipeline but having trouble to get the build failure case in the post section. For a scripted pipeline, I can easily wrap the pipeline inside a try-catch and have access to the exception object. But not for declarative pipeline like this: pipeline { stages { ... } post{ failure { script { //this is where i need the failure exception detail handleFailure() } } } } Im not sure how to do that, I'm trying getContext() method but it

Jenkins Declarative pipeline get build failure cause

耗尽温柔 提交于 2020-05-17 05:51:10
问题 I recently converted a scripted pipeline into a declarative pipeline but having trouble to get the build failure case in the post section. For a scripted pipeline, I can easily wrap the pipeline inside a try-catch and have access to the exception object. But not for declarative pipeline like this: pipeline { stages { ... } post{ failure { script { //this is where i need the failure exception detail handleFailure() } } } } Im not sure how to do that, I'm trying getContext() method but it

How to set role-based login for jenkins in keycloak

五迷三道 提交于 2020-05-17 05:32:10
问题 I am very beginner of keycloak. I need some help. I have SSO solution and I want to integrate it with jenkins. In this point, I want to permit some users based role. OpenID -- keycloak -- jenkins : all users who are in openid can login jenkins (I don't want) OpenID -- keycloak (check role) -- jenkins : all users who are in openid and also have specific role in keycloak can login jenkins (I want) I think this is very simple and common example of using keycloak, but I can't find the solution.

How to set role-based login for jenkins in keycloak

好久不见. 提交于 2020-05-17 05:32:05
问题 I am very beginner of keycloak. I need some help. I have SSO solution and I want to integrate it with jenkins. In this point, I want to permit some users based role. OpenID -- keycloak -- jenkins : all users who are in openid can login jenkins (I don't want) OpenID -- keycloak (check role) -- jenkins : all users who are in openid and also have specific role in keycloak can login jenkins (I want) I think this is very simple and common example of using keycloak, but I can't find the solution.

How to set role-based login for jenkins in keycloak

夙愿已清 提交于 2020-05-17 05:31:36
问题 I am very beginner of keycloak. I need some help. I have SSO solution and I want to integrate it with jenkins. In this point, I want to permit some users based role. OpenID -- keycloak -- jenkins : all users who are in openid can login jenkins (I don't want) OpenID -- keycloak (check role) -- jenkins : all users who are in openid and also have specific role in keycloak can login jenkins (I want) I think this is very simple and common example of using keycloak, but I can't find the solution.

How to set role-based login for jenkins in keycloak

我是研究僧i 提交于 2020-05-17 05:31:32
问题 I am very beginner of keycloak. I need some help. I have SSO solution and I want to integrate it with jenkins. In this point, I want to permit some users based role. OpenID -- keycloak -- jenkins : all users who are in openid can login jenkins (I don't want) OpenID -- keycloak (check role) -- jenkins : all users who are in openid and also have specific role in keycloak can login jenkins (I want) I think this is very simple and common example of using keycloak, but I can't find the solution.

Maven versioning and release GIT repository

柔情痞子 提交于 2020-05-16 03:23:06
问题 I have a multiple maven projects in a single GIT repository .I wanted to perform individual release for the maven projects,push the release version to nexus, skip the tagging and increment the snapshot and commit. Maven release goal used release:clean release:prepare release:perform Maven Release plugin : <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>${maven.releaseplugin.version}</version> <configuration> <tagNameFormat>v@{project

Gitflow Workflow with Maven - when to build what?

核能气质少年 提交于 2020-05-16 02:05:40
问题 Gitflow introduces several branches like develop , release , hotfix , and also encourages feature branches. In a Maven project, you usually build SNAPSHOT and release versions, and often number them with semantic, three-digit versions. It would be sensible to automate the build process as much as possible, but the question is: When should we build a SNAPSHOT version, when should be build a release version, when should we build none of that at all? I image the following could be sensible:

Git push using jenkins credentials from declarative pipeline

浪子不回头ぞ 提交于 2020-05-15 09:39:20
问题 I'm using jenkins pipeline (declarative synthax) and I want to push a commit to my remote repository. Is there any way to accomplish this using the git plugin? Here is what I'm currently trying: withCredentials([usernamePassword(credentialsId: "${GIT_CREDENTIAL_ID}", passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) { sh "git add ${BRANCH_RENAME}.bundle" sh "echo ${GIT_USERNAME}|||||||${GIT_PASSWORD}" sh "git tag -a backup -m 'Backup branch ${BRANCH} from vega-salesforce