From 8f6aec1a7b78a12468443c2c71e835bb0ff956bc Mon Sep 17 00:00:00 2001 From: Ivan Fernandez Calvo Date: Thu, 3 Jan 2019 13:49:32 +0100 Subject: [PATCH] [APM-CI] document the checkout process (#22) * [APM-CI] documment the checkout process * update README --- vars/README.md | 7 ++++++- vars/gitCheckout.txt | 5 +++++ vars/githubPrCheckApproved.groovy | 2 +- vars/githubPrCheckApproved.txt | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/vars/README.md b/vars/README.md index b0e5bbbfd..ed5b44060 100644 --- a/vars/README.md +++ b/vars/README.md @@ -81,6 +81,11 @@ def jsonValue = getVaultSecret('secret-name') Perform a checkout from the SCM configuration on a folder inside the workspace, if branch, repo, and credentialsId are defined make a checkout using those parameters. +For security reasons PRs from not Elastic organization or with write permissions +on the repo are block at this point see [githubPrCheckApproved](#githubPrCheckApproved), +whoever if you login in the Jenkins UI, it would be always possible to trigger +the job manually from the Jenkins UI. + ``` gitCheckout() ``` @@ -150,7 +155,7 @@ githubEnv() ## githubPrCheckApproved If the current build is a PR, it would check if it is approved or created by a user with write/admin permission on the repo. -If it is not approbed, the method will throw an error. +If it is not approved, the method will throw an error. ``` githubPrCheckApproved() diff --git a/vars/gitCheckout.txt b/vars/gitCheckout.txt index 6a9fd1198..d9d022752 100644 --- a/vars/gitCheckout.txt +++ b/vars/gitCheckout.txt @@ -1,6 +1,11 @@ Perform a checkout from the SCM configuration on a folder inside the workspace, if branch, repo, and credentialsId are defined make a checkout using those parameters. +For security reasons PRs from not Elastic organization or with write permissions +on the repo are block at this point see [githubPrCheckApproved](#githubPrCheckApproved), +whoever if you login in the Jenkins UI, it would be always possible to trigger +the job manually from the Jenkins UI. + ``` gitCheckout() ``` diff --git a/vars/githubPrCheckApproved.groovy b/vars/githubPrCheckApproved.groovy index 679456ccd..bd353689c 100644 --- a/vars/githubPrCheckApproved.groovy +++ b/vars/githubPrCheckApproved.groovy @@ -1,7 +1,7 @@ /** If the current build is a PR, it would check if it is approved or created by a user with write/admin permission on the repo. - If it is not approbed, the method will throw an error. + If it is not approved, the method will throw an error. githubPrCheckApproved() */ diff --git a/vars/githubPrCheckApproved.txt b/vars/githubPrCheckApproved.txt index d766991e6..86e174d9b 100644 --- a/vars/githubPrCheckApproved.txt +++ b/vars/githubPrCheckApproved.txt @@ -1,6 +1,6 @@ If the current build is a PR, it would check if it is approved or created by a user with write/admin permission on the repo. -If it is not approbed, the method will throw an error. +If it is not approved, the method will throw an error. ``` githubPrCheckApproved()