mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-03-11 01:49:30 +00:00
ci: use github/refs/pull/<pr-id>/merge instead of doing a rebase
When fetching refs/pull/<pr-id/merge from GitHub, there is no need to do a manual rebase. This makes things easier, as a the scripted rebases sometimes cause CI jobs to fail. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
cd893ba376
commit
466ada3860
@ -11,7 +11,7 @@ def doc_change = 0
|
|||||||
node('cico-workspace') {
|
node('cico-workspace') {
|
||||||
stage('checkout ci repository') {
|
stage('checkout ci repository') {
|
||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/head"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
checkout([$class: 'GitSCM', branches: [[name: 'FETCH_HEAD']],
|
checkout([$class: 'GitSCM', branches: [[name: 'FETCH_HEAD']],
|
||||||
userRemoteConfigs: [[url: "${ci_git_repo}", refspec: "${ref}"]]])
|
userRemoteConfigs: [[url: "${ci_git_repo}", refspec: "${ref}"]]])
|
||||||
@ -19,7 +19,7 @@ node('cico-workspace') {
|
|||||||
|
|
||||||
stage('checkout PR') {
|
stage('checkout PR') {
|
||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/head"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
if (params.ghprbTargetBranch != null) {
|
if (params.ghprbTargetBranch != null) {
|
||||||
git_since = "${ghprbTargetBranch}"
|
git_since = "${ghprbTargetBranch}"
|
||||||
@ -65,7 +65,7 @@ node('cico-workspace') {
|
|||||||
sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} ./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${ci_git_repo} --ref=${ref} ${base}"
|
sh "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} ./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${ci_git_repo} --ref=${ref} ${base}"
|
||||||
}
|
}
|
||||||
stage('test') {
|
stage('test') {
|
||||||
sh 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} "cd /opt/build/go/src/github.com/ceph/ceph-csi && make REBASE=1"'
|
sh 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@${CICO_NODE} "cd /opt/build/go/src/github.com/ceph/ceph-csi && make"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ node('cico-workspace') {
|
|||||||
|
|
||||||
stage('checkout PR') {
|
stage('checkout PR') {
|
||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/head"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
if (params.ghprbTargetBranch != null) {
|
if (params.ghprbTargetBranch != null) {
|
||||||
git_since = "${ghprbTargetBranch}"
|
git_since = "${ghprbTargetBranch}"
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
def GIT_BRANCH = 'ci/centos'
|
def GIT_BRANCH = 'ci/centos'
|
||||||
|
|
||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
GIT_BRANCH = "pull/${ghprbPullId}/head"
|
GIT_BRANCH = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
|
|
||||||
node {
|
node {
|
||||||
|
@ -92,7 +92,7 @@ node('cico-workspace') {
|
|||||||
try {
|
try {
|
||||||
stage('prepare bare-metal machine') {
|
stage('prepare bare-metal machine') {
|
||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/head"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
||||||
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
||||||
|
@ -89,7 +89,7 @@ node('cico-workspace') {
|
|||||||
try {
|
try {
|
||||||
stage('prepare bare-metal machine') {
|
stage('prepare bare-metal machine') {
|
||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/head"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
||||||
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
||||||
|
@ -89,7 +89,7 @@ node('cico-workspace') {
|
|||||||
try {
|
try {
|
||||||
stage('prepare bare-metal machine') {
|
stage('prepare bare-metal machine') {
|
||||||
if (params.ghprbPullId != null) {
|
if (params.ghprbPullId != null) {
|
||||||
ref = "pull/${ghprbPullId}/head"
|
ref = "pull/${ghprbPullId}/merge"
|
||||||
}
|
}
|
||||||
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
sh 'scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ./prepare.sh ./single-node-k8s.sh root@${CICO_NODE}:'
|
||||||
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
ssh "./prepare.sh --workdir=/opt/build/go/src/github.com/ceph/ceph-csi --gitrepo=${git_repo} --ref=${ref}"
|
||||||
|
Loading…
Reference in New Issue
Block a user