Commit e090873c authored by 罗剑's avatar 罗剑

Update .gitlab-ci.yml

parent daa3b56f
Pipeline #52986 waiting for manual action with stages
variables: variables:
TARGET_REPO_2021: "F:/CIV_CI/CivWebPublish2021_CIVWeb5/CivWebPublish2021/" TARGET_REPO_SOLU: "F:/CIV_CI/PandaSolution/civmanage"
GIT_STRATEGY: 'fetch' GIT_STRATEGY: 'fetch'
GIT_CHECKOUT: 'false' GIT_CHECKOUT: 'false'
...@@ -33,22 +33,22 @@ install: ...@@ -33,22 +33,22 @@ install:
# paths: # paths:
# - node_modules/ # - node_modules/
only: only:
- master - dev-solution
when: manual when: manual
package: package:
stage: package stage: package
script: script:
- echo "${CI_PROJECT_DIR}" - echo "${CI_PROJECT_DIR}"
- git pull origin master - git pull origin dev-solution
- npm run build --releasepath=../CivWebPublish2021 - npm run build --releasepath=../civmanage
#cache: #cache:
# key: ${CI_COMMIT_REF_SLUG} # key: ${CI_COMMIT_REF_SLUG}
# paths: # paths:
# - node_modules/ # - node_modules/
allow_failure: false allow_failure: false
only: only:
- master - dev-solution
when: manual when: manual
push: push:
...@@ -56,19 +56,16 @@ push: ...@@ -56,19 +56,16 @@ push:
GIT_STRATEGY: none GIT_STRATEGY: none
stage: push stage: push
script: script:
- 'cd "${TARGET_REPO_2021}"' - 'cd "${TARGET_REPO_SOLU}"'
- 'git reset --hard head' - 'git reset --hard head'
- '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/PandaSolution/civmanage.git"'
- 'git pull origin map' - 'git pull origin master'
#- 'git rm -rf "${TARGET_REPO_2021}/civmanage"' - 'robocopy "${CI_PROJECT_DIR}/../civmanage" "${TARGET_REPO_SOLU}/" /S ;
#- '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"}' 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 master'
allow_failure: false allow_failure: false
only: only:
- master - dev-solution
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