Skip to content

Commit 5c39302

Browse files
authored
[release] fetch tags before checking out (elastic#2259)
1 parent 44bcbe1 commit 5c39302

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.ci/release/Jenkinsfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ pipeline {
159159
if (isMajor) {
160160
// major release, create '.x' branch
161161
sh(script: """
162+
git fetch origin ${RELEASE_TAG} # ensure remote tag is fetched for local checkout
162163
git checkout ${RELEASE_TAG}
163164
git checkout -b ${BRANCH_DOT_X}
164165
""")
@@ -169,6 +170,7 @@ pipeline {
169170
// fix doc or release notes should also have been applied to master/stable branch we are releasing from
170171
sh(script: """
171172
git fetch origin ${BRANCH_DOT_X} # ensure remote branch is fetched for local checkout
173+
git fetch origin ${RELEASE_TAG} # ensure remote tag is fetched for local checkout
172174
git checkout --track origin/${BRANCH_DOT_X}
173175
git reset --hard ${RELEASE_TAG}
174176
""")

0 commit comments

Comments
 (0)