Commit 85d3a9df authored by CIV_持续集成's avatar CIV_持续集成

init gitlab-ci.yml

parent 196ba8f4
Pipeline #21265 passed with stages
in 25 minutes 54 seconds
variables:
TARGET_REPO: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2021/"
before_script:
- chcp 65001
- 'git config core.autocrlf false'
stages:
- install
- package
- push
install:
stage: install
script:
- npm install
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
only:
refs:
- master
variables:
- $NPM_INSTALL == "true"
when: manual
package:
stage: package
script:
- echo "${CI_PROJECT_DIR}"
- npm run build --releasepath=../CivWebPublish2021
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
only:
- master
when: manual
push:
variables:
GIT_STRATEGY: none
stage: push
script:
- 'cd "${TARGET_REPO}"'
- 'git reset --hard head'
- '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'
- 'robocopy "${CI_PROJECT_DIR}/../../CivWebPublish2021/civweb" "${TARGET_REPO}/civweb" /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 CivWeb5."'
- '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