Skip to content

Commit 14d325b

Browse files
committed
fix credential id
1 parent 688d551 commit 14d325b

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

Jenkinsfile

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pipeline {
4242
sh "which go"
4343
sh "go version"
4444
sh "go env"
45-
sshagent(credentials: ['CB SG Robot Github SSH Key']) {
45+
sshagent(credentials: ['CB_SG_Robot_Github_SSH_Key']) {
4646
sh '''
4747
[ -d ~/.ssh ] || mkdir ~/.ssh && chmod 0700 ~/.ssh
4848
ssh-keyscan -t rsa,dsa github.com >> ~/.ssh/known_hosts
@@ -286,6 +286,40 @@ pipeline {
286286
}
287287
}
288288

289+
stage('LiteCore') {
290+
stages {
291+
stage('against CE') {
292+
// TODO: Remove skip
293+
when { expression { return false } }
294+
steps {
295+
echo 'Example of where we could run an alternate version of lite-core unit tests, or against a running SG CE'
296+
}
297+
}
298+
stage('against EE') {
299+
// CBG-2237 skipping stage due to regular litecore test segfaults
300+
when { expression { return false } }
301+
steps {
302+
githubNotify(credentialsId: "${GH_ACCESS_TOKEN_CREDENTIAL}", context: 'sgw-pipeline-litecore-ee', description: 'Running LiteCore Tests', status: 'PENDING')
303+
sh 'touch verbose_litecore.out'
304+
sh 'touch verbose_litecore-sg_trace.out'
305+
script {
306+
withCredentials([sshUserPrivateKey(credentialsId: 'CB_SG_Robot_Github_SSH_Key', keyFileVariable: 'KEY')]) {
307+
try {
308+
sh 'docker run --rm -v $KEY:/root/.ssh/id_rsa -v `pwd`/sync_gateway_ee-linux:/sync_gateway -v `pwd`/verbose_litecore.out:/output.out -v `pwd`/verbose_litecore-sg_trace.out:/tmp/sglog/sg_trace.log couchbase/sg-test-litecore:latest -legacy-config'
309+
githubNotify(credentialsId: "${GH_ACCESS_TOKEN_CREDENTIAL}", context: 'sgw-pipeline-litecore-ee', description: 'EE with LiteCore Test Passed', status: 'SUCCESS')
310+
} catch (Exception e) {
311+
githubNotify(credentialsId: "${GH_ACCESS_TOKEN_CREDENTIAL}", context: 'sgw-pipeline-litecore-ee', description: 'EE with LiteCore Test Failed', status: 'FAILURE')
312+
// archive verbose test logs in the event of a test failure
313+
archiveArtifacts artifacts: 'verbose_litecore*.out', fingerprint: false
314+
unstable("EE LIteCore Test Failed")
315+
}
316+
}
317+
}
318+
}
319+
}
320+
}
321+
}
322+
289323
stage('Integration') {
290324
stages {
291325
stage('main') {

0 commit comments

Comments
 (0)