Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 5526d7a

Browse files
committed
fix: do not use GT_REPO variable, use fixed repo name instead (#1049)
* fix: do not use GT_REPO variable, use fixed repo name Because the repo is always Kibana, let's use it * chore: remove unused echo
1 parent fea7c02 commit 5526d7a

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

.ci/e2eKibana.groovy

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pipeline {
77
environment {
88
REPO = 'kibana'
99
BASE_DIR = "src/github.com/elastic/${env.REPO}"
10+
ELASTIC_REPO = "elastic/${env.REPO}"
1011
GITHUB_APP_SECRET = 'secret/observability-team/ci/github-app'
1112
GITHUB_CHECK_E2E_TESTS_NAME = 'E2E Tests'
1213
PIPELINE_LOG_LEVEL = "INFO"
@@ -28,8 +29,7 @@ pipeline {
2829
[key: 'GT_REPO', value: '$.repository.full_name'],
2930
[key: 'GT_PR', value: '$.issue.number'],
3031
[key: 'GT_BODY', value: '$.comment.body'],
31-
[key: 'GT_COMMENT_ID', value: '$.comment.id'],
32-
[key: 'GT_PAYLOAD', value: '$']
32+
[key: 'GT_COMMENT_ID', value: '$.comment.id']
3333
],
3434
genericHeaderVariables: [
3535
[key: 'x-github-event', regexpFilter: 'comment']
@@ -53,7 +53,6 @@ pipeline {
5353
PATH = "${env.HOME}/bin:${env.HOME}/node_modules:${env.HOME}/node_modules/.bin:${env.PATH}"
5454
}
5555
steps {
56-
echo(message: "$env.GT_PAYLOAD")
5756
checkPermissions()
5857
buildKibanaDockerImage(refspec: getBranch())
5958
catchError(buildResult: 'UNSTABLE', message: 'Unable to run e2e tests', stageResult: 'FAILURE') {
@@ -70,7 +69,7 @@ def checkPermissions(){
7069
error("Only PRs from Elasticians can be tested with Fleet E2E tests")
7170
}
7271

73-
if(!hasCommentAuthorWritePermissions(repoName: 'elastic/kibana', commentId: env.GT_COMMENT_ID)){
72+
if(!hasCommentAuthorWritePermissions(repoName: "${env.ELASTIC_REPO}", commentId: env.GT_COMMENT_ID)){
7473
error("Only Elasticians can trigger Fleet E2E tests")
7574
}
7675
}
@@ -94,7 +93,7 @@ def runE2ETests(String suite) {
9493
def prID = getID()
9594
def token = githubAppToken(secret: "${env.GITHUB_APP_SECRET}")
9695

97-
def pullRequest = githubApiCall(token: token, url: "https://api.github.com/repos/${env.GT_REPO}/pulls/${prID}")
96+
def pullRequest = githubApiCall(token: token, url: "https://api.github.com/repos/${env.ELASTIC_REPO}/pulls/${prID}")
9897
def baseRef = pullRequest?.base?.ref
9998
def headSha = pullRequest?.head?.sha
10099

0 commit comments

Comments
 (0)