Skip to content

Commit

Permalink
master builds should use the commit at the time it was merged
Browse files Browse the repository at this point in the history
  • Loading branch information
reaperhulk committed May 24, 2017
1 parent 6091e11 commit dc0c6fc
Showing 1 changed file with 28 additions and 11 deletions.
39 changes: 28 additions & 11 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,39 @@ def checkout_git(label) {
cd cryptography
git fetch origin +refs/pull/${env.CHANGE_ID}/merge:
git checkout -qf FETCH_HEAD
git rev-parse HEAD
"""
if (label.contains("windows")) {
bat script
} else {
sh """#!/bin/sh
set -xe
${script}
"""
}
} else {
script = """
git clone --depth=1 https://github.com/pyca/cryptography.git cryptography
cd cryptography
git checkout ${env.BRANCH_NAME}
git rev-parse HEAD
"""
checkout([
$class: 'GitSCM',
branches: [[name: "*/${env.BRANCH_NAME}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [[
$class: 'RelativeTargetDirectory',
relativeTargetDir: 'cryptography'
]],
submoduleCfg: [],
userRemoteConfigs: [[
'url': 'https://github.com/pyca/cryptography'
]]
])
}
if (label.contains("windows")) {
bat script
bat """
cd cryptography
git rev-parse HEAD
"""
} else {
sh """#!/bin/sh
set -xe
${script}
sh """
cd cryptography
git rev-parse HEAD
"""
}
}
Expand Down

0 comments on commit dc0c6fc

Please sign in to comment.