diff --git a/Jenkinsfile b/Jenkinsfile index fc866d4..dd3162e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,6 +28,12 @@ lockIf(isIntegration(), 'integration-lock') { authorName = sh(script: "git log -1 --format='%an' ${inputSHA}", returnStdout: true).trim() authorEmail = sh(script: "git log -1 --format='%ae' ${inputSHA}", returnStdout: true).trim() + // Somehow these branches don't exist post-clone + sh """\ + git fetch origin ${INTEGRATION_BRANCH}:${INTEGRATION_BRANCH} + git fetch origin ${BRANCH_NAME}:${BRANCH_NAME} + """.stripIndent() + // 5 minutes of patience timeout(5) { if (!isIntegration()) { @@ -38,21 +44,18 @@ lockIf(isIntegration(), 'integration-lock') { sh """\ git config user.email "${authorEmail}" git config user.name "${authorName}" - git fetch origin "${INTEGRATION_BRANCH}":"${INTEGRATION_BRANCH}" - git checkout "${INTEGRATION_BRANCH}" - if [ "\$(git branch --contains ${inputSHA} | wc -l)" -gt "0" ] + git checkout "${INTEGRATION_BRANCH}" + if [ "\$(git branch --contains ${inputSHA} | wc -l)" -gt "1" ] then echo "MERGE ERROR: ${BRANCH_NAME} already exists in ${INTEGRATION_BRANCH}" exit 1 fi - COMMITS="\$(git log --oneline ${INTEGRATION_BRANCH}..${inputSHA} | wc -l)" - if [ "\${COMMITS}" -gt "1" ] || ! git merge --ff-only ${inputSHA} - then - git reset --hard origin/${INTEGRATION_BRANCH} - git merge --no-ff --no-commit ${inputSHA} - git commit --author "${authorName} <${authorEmail}>" --message "Merge branch '${BRANCH_NAME}' into '${INTEGRATION_BRANCH}'" - fi""".stripIndent() + + git rebase ${INTEGRATION_BRANCH} ${BRANCH_NAME} + git checkout "${INTEGRATION_BRANCH}" + git merge --ff-only ${BRANCH_NAME} + """.stripIndent() } } stash name: 'merge-result', includes: '**', useDefaultExcludes: false diff --git a/build.gradle b/build.gradle index ef45d45..f0621b9 100644 --- a/build.gradle +++ b/build.gradle @@ -18,12 +18,16 @@ apply plugin: 'maven-publish' repositories { jcenter() maven { - url 'http://code.praqma.net/repo/maven/' + url 'https://repo.jenkins-ci.org/public/' } } dependencies { - compile 'net.praqma:cool:0.6.50' + // COOL + compile fileTree(dir: 'libs', include: ['*.jar']) + compile "net.praqma:praqmajutils:1.0.0" + + // Other compile 'org.slf4j:slf4j-api:1.7.25' compile 'org.codehaus.groovy:groovy-all:2.4.12' compile 'org.jfrog.artifactory.client:artifactory-java-client-services:1.2.2' diff --git a/libs/cool-0.6.50.jar b/libs/cool-0.6.50.jar new file mode 100644 index 0000000..18e205e Binary files /dev/null and b/libs/cool-0.6.50.jar differ