diff --git a/Jenkinsfile b/Jenkinsfile index 6a41bc1d7bd7761aba1e241e46838c3db8b08e66..c089058a9bb2f2265a5cb9a6ccba16e66f789415 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,39 @@ pipeline { agent any - + triggers { + gerrit customUrl: '', + gerritProjects: [ + [branches: [[compareType: 'PLAIN', pattern: 'master']], + compareType: 'PLAIN', + disableStrictForbiddenFileVerification: false, + pattern: 'dhtnet']], + triggerOnEvents: [ + commentAddedContains('!build'), + patchsetCreated(excludeDrafts: true, excludeNoCodeChange: true, + excludeTrivialRebase: true)] + } + options { + ansiColor('xterm') + } + parameters { + string(name: 'GERRIT_REFSPEC', + defaultValue: 'refs/heads/dhtnet', + description: 'The Gerrit refspec to fetch.') + } stages { + stage('SCM Checkout') { + steps { + checkout changelog: true, poll: false, + scm: [$class: 'GitSCM', + branches: [[name: 'FETCH_HEAD']], + doGenerateSubmoduleConfigurations: false, + extensions: [ + [$class: 'CloneOption', noTags: true, reference: '', shallow: true], + [$class: 'WipeWorkspace']], + submoduleCfg: [], + userRemoteConfigs: [[refspec: '${GERRIT_REFSPEC}', url: 'https://${JAMI_GERRIT_URL}/dhtnet']]] + } + } stage('Build') { steps { script {