Select Git revision
stack_updater.yml
-
Lopez de Guereña Caballero, Jon authoredLopez de Guereña Caballero, Jon authored
stack_updater.yml 1.39 KiB
update:
stage: update
tags:
- docker
image: node:14
variables:
GIT_STRATEGY: clone
before_script:
- apt-get update -y && apt-get upgrade -y git --fix-missing
- git config --global user.email "stack_updater@tecnalia.com"
- git config --global user.name "Stack Updater"
- git clone --depth=1 "https://${access_token_name}:${access_token}@git.code.tecnalia.com/stack-update-group/package-version-updater.git"
- npm install -g package-version-updater
script:
- git checkout $current_version
- git pull
- node package-version-updater/versionUpdater.js -v $current_version -m $module_type
- bash package-version-updater/stage_file.sh
- git commit -m "${current_version}"
- git tag -a v${current_version} -m ""
- branch=`bash package-version-updater/get_principal_branch.sh`
- echo ${branch}
- git checkout ${branch}
- git pull
- git branch --set-upstream-to=origin/${branch} ${branch}
- git merge -X theirs $current_version
- git remote rm origin && git remote add origin "https://${access_token_name}:${access_token}@git.code.tecnalia.com/${CI_PROJECT_PATH}.git"
- git push --follow-tags --set-upstream origin ${branch}
- node package-version-updater/updateGitlabSide.js --cV $current_version --nV $next_version -p $CI_PROJECT_ID -t $access_token
only:
- api