Commit 1c5091c3 authored by Administrator's avatar Administrator

Update .gitlab-ci.yml

parent 2550bf0c
Pipeline #41551 skipped with stages
variables: variables:
TARGET_REPO_2021: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2021/" TARGET_REPO_2021: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2021/"
TARGET_REPO_2020: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2020/" 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: before_script:
- chcp 65001 - chcp 65001
- 'git config core.autocrlf false' - 'git config core.autocrlf false'
stages: stages:
- checkout
- install - install
- package - package
- push - push
checkout:
stage: checkout
variables:
GIT_CHECKOUT: 'true'
script:
- echo "Got a clean git copy."
only:
- master
when: manual
install: install:
stage: install stage: install
script: script:
- npm run init - npm run init
cache: #cache:
key: ${CI_COMMIT_REF_SLUG} # key: ${CI_COMMIT_REF_SLUG}
paths: # paths:
- node_modules/ # - node_modules/
only: only:
- master - master
when: manual when: manual
...@@ -29,10 +45,10 @@ package: ...@@ -29,10 +45,10 @@ package:
script: script:
- echo "${CI_PROJECT_DIR}" - echo "${CI_PROJECT_DIR}"
- npm run build --releasepath=../CivWebPublish2021 - npm run build --releasepath=../CivWebPublish2021
cache: #cache:
key: ${CI_COMMIT_REF_SLUG} # key: ${CI_COMMIT_REF_SLUG}
paths: # paths:
- node_modules/ # - node_modules/
only: only:
- master - master
when: manual when: manual
...@@ -47,39 +63,13 @@ push: ...@@ -47,39 +63,13 @@ push:
- 'git clean -fd' - 'git clean -fd'
- 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"' - 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"'
- 'git pull origin map' - 'git pull origin map'
- 'git rm -rf "${TARGET_REPO_2021}/civmanage"' #- 'git rm -rf "${TARGET_REPO_2021}/civmanage"'
- 'git commit -m "chore: clear folder civmanage"' #- 'git commit -m "chore: clear folder civmanage"'
- 'git push origin map' #- 'git push origin map'
- 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2021}/civmanage" /S ; - 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2021}/civmanage" /S ;
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}' 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 add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."'
- 'git push origin map' - '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: only:
- master - master
when: manual 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