File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -208,6 +208,10 @@ spec:
208
208
set -x
209
209
set -e
210
210
211
+ git fetch origin ${BRANCH} --tags
212
+ git checkout ${BRANCH}
213
+ git branch --set-upstream-to=origin/${BRANCH} ${BRANCH}
214
+
211
215
echo "IMAGE_NAME=$(basename -s .git `git config --get remote.origin.url` | tr '[:upper:]' '[:lower:]' | sed 's/_/-/g')" > ./env-config
212
216
213
217
if [[ "${BRANCH}" == "master" ]] && [[ $(git describe --tag `git rev-parse HEAD`) =~ "^[0-9]+.[0-9]+.[0-9]+$" ]] || \
@@ -218,10 +222,6 @@ spec:
218
222
exit 0
219
223
fi
220
224
221
- git fetch origin ${BRANCH} --tags
222
- git checkout ${BRANCH}
223
- git branch --set-upstream-to=origin/${BRANCH} ${BRANCH}
224
-
225
225
git config --global user.name "Jenkins Pipeline"
226
226
git config --global user.email "[email protected] "
227
227
git config --local credential.helper "!f() { echo username=\\ $GIT_AUTH_USER; echo password=\\ $GIT_AUTH_PWD; }; f"
You can’t perform that action at this time.
0 commit comments