Commit 51b97a9a authored by JooHan Hong's avatar JooHan Hong

프로젝트 분산백업적용

parent 18db5982
Pipeline #5067 passed with stages
in 3 seconds
stages:
- deploy
- backup
variables:
GIT_STRATEGY: clone
GIT_SSL_NO_VERIFY: "1"
TARGET_TB2_DIR: /var/lib/libvirt/GIT/joohanhong/UPLOAD
TARGET_TB3_DIR: /GIT/joohanhong/UPLOAD
TARGET_BACKUP_DIR: /GIT/joohanhong
#before_script:
# - (if [[ ! -d ${TARGET_TB2_DIR} ]]; then mkdir -p ${TARGET_TB2_DIR}; fi);
# - (if [[ ! -d ${TARGET_TB3_DIR} ]]; then mkdir -p ${TARGET_TB3_DIR}; fi);
# - (if [[ ! -d ${TARGET_TB3_SUB_DIR} ]]; then mkdir -p ${TARGET_TB3_SUB_DIR}; fi);
# - (if [[ ! -d ${TARGET_STORAGE_DIR} ]]; then mkdir -p ${TARGET_STORAGE_DIR}; fi);
tb2:
stage: deploy
only:
- master
before_script:
- (if [[ ! -d ${TARGET_TB2_DIR} ]]; then mkdir -p ${TARGET_TB2_DIR}; fi);
script:
- rsync -ar --delete ${CI_PROJECT_DIR}/* ${TARGET_TB2_DIR}/
tags:
- tb2
tb3:
stage: deploy
only:
- master
before_script:
- (if [[ ! -d ${TARGET_TB3_DIR} ]]; then mkdir -p ${TARGET_TB3_DIR}; fi);
script:
- rsync -ar --delete ${CI_PROJECT_DIR}/* ${TARGET_TB3_DIR}/
tags:
- tb3
backup:
stage: backup
only:
- master
before_script:
- (if [[ ! -d ${TARGET_BACKUP_DIR} ]]; then mkdir -p ${TARGET_BACKUP_DIR}; fi);
script:
- rsync -ar --delete ${CI_PROJECT_DIR}/* ${TARGET_BACKUP_DIR}/
tags:
- backup
#!/bin/bash
git fetch upstream
git pull
#git merge upstream/master
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