Skip to content

Commit a55115f

Browse files
Jenkins: trigger integ tests on successful build.
1 parent a8edeca commit a55115f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Jenkinsfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pipeline {
1717
environment {
1818
GITLAB_URL = credentials('gitlab_url')
1919
GITLAB_TOKEN = credentials('GITLAB_TOKEN_ALL')
20+
GITLAB_INTEG_TESTS_TRIGGER_URL = credentials('gitlab-trigger-java-integ-tests')
2021
// Note: for key use Jenkins secret file with PGP key as text in ASCII-armored format.
2122
ORG_GRADLE_PROJECT_signingKeyFile = credentials('objectbox_signing_key')
2223
ORG_GRADLE_PROJECT_signingKeyId = credentials('objectbox_signing_key_id')
@@ -109,6 +110,11 @@ pipeline {
109110

110111
success {
111112
updateGitlabCommitStatus name: 'build', state: 'success'
113+
// Trigger integration tests in GitLab
114+
// URL configured like <host>/api/v4/projects/<id>/trigger/pipeline?token=<token>
115+
// Note: do not fail on error in case ref does not exist, only output response
116+
// --silent --show-error disable progress output but still show errors
117+
sh 'curl --silent --show-error -X POST "$GITLAB_INTEG_TESTS_TRIGGER_URL&ref=$GIT_BRANCH"'
112118
}
113119
}
114120
}

0 commit comments

Comments
 (0)