Commit 1c5091c3 authored by Administrator's avatar Administrator

Update .gitlab-ci.yml

parent 2550bf0c
Pipeline #41551 skipped with stages
variables:
TARGET_REPO_2021: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2021/"
TARGET_REPO_2020: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2020/"
TARGET_REPO_2019: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish/"
#TARGET_REPO_2019: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish/"
GIT_STRATEGY: 'fetch'
GIT_CHECKOUT: 'false'
before_script:
- chcp 65001
- 'git config core.autocrlf false'
stages:
- checkout
- install
- package
- push
checkout:
stage: checkout
variables:
GIT_CHECKOUT: 'true'
script:
- echo "Got a clean git copy."
only:
- master
when: manual
install:
stage: install
script:
- npm run init
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
#cache:
# key: ${CI_COMMIT_REF_SLUG}
# paths:
# - node_modules/
only:
- master
when: manual
......@@ -29,10 +45,10 @@ package:
script:
- echo "${CI_PROJECT_DIR}"
- npm run build --releasepath=../CivWebPublish2021
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
#cache:
# key: ${CI_COMMIT_REF_SLUG}
# paths:
# - node_modules/
only:
- master
when: manual
......@@ -47,39 +63,13 @@ push:
- 'git clean -fd'
- 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"'
- 'git pull origin map'
- 'git rm -rf "${TARGET_REPO_2021}/civmanage"'
- 'git commit -m "chore: clear folder civmanage"'
- 'git push origin map'
#- 'git rm -rf "${TARGET_REPO_2021}/civmanage"'
#- 'git commit -m "chore: clear folder civmanage"'
#- 'git push origin map'
- 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2021}/civmanage" /S ;
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}'
- 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."'
- 'git push origin map'
- 'cd "${TARGET_REPO_2020}"'
- 'git reset --hard head'
- 'git clean -fd'
- 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2020.git"'
- 'git pull origin map'
- 'git rm -rf "${TARGET_REPO_2020}/civmanage"'
- 'git commit -m "chore: clear folder civmanage"'
- 'git push origin map'
- 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2020}/civmanage" /S ;
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}'
- 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."'
- 'git push origin map'
- 'cd "${TARGET_REPO_2019}"'
- 'git reset --hard head'
- 'git clean -fd'
- 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish.git"'
- 'git pull origin map'
- 'git rm -rf "${TARGET_REPO_2019}/civmanage"'
- 'git commit -m "chore: clear folder civmanage"'
- 'git push origin map'
- 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2019}/civmanage" /S ;
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}'
- 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."'
- 'git push origin map'
only:
- master
when: manual
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment