Commit 3b12b2f3 authored by John Red Medrano's avatar John Red Medrano

Update .gitlab-ci.yml

parent 878a402d
Pipeline #313 failed with stages
in 49 seconds
...@@ -59,6 +59,7 @@ clean_initial_repo: ...@@ -59,6 +59,7 @@ clean_initial_repo:
- chmod 700 ~/.ssh - chmod 700 ~/.ssh
- echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa - echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh -tt centos@13.251.192.208 "cd $root_path/dev/$repo_folder && docker-compose -f docker-compose.yml -p xxx_rmsv2_api_container down"
- ssh -tt centos@13.251.192.208 "sudo rm -rf $root_path/dev" - ssh -tt centos@13.251.192.208 "sudo rm -rf $root_path/dev"
rebuild_dev: rebuild_dev:
...@@ -97,7 +98,7 @@ clean_rebuild_dev: ...@@ -97,7 +98,7 @@ clean_rebuild_dev:
stage: clean_rebuild_dev stage: clean_rebuild_dev
image: ubuntu image: ubuntu
rules: rules:
- if: '$CI_COMMIT_MESSAGE =~ /initial/ && $CI_COMMIT_BRANCH == "red-develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"' - if: '$CI_COMMIT_MESSAGE !~ /initial/ && $CI_COMMIT_BRANCH == "red-develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: on_failure when: on_failure
script: script:
- echo "this is a clean up for clean_rebuild_dev" - echo "this is a clean up for clean_rebuild_dev"
...@@ -107,6 +108,7 @@ clean_rebuild_dev: ...@@ -107,6 +108,7 @@ clean_rebuild_dev:
- chmod 700 ~/.ssh - chmod 700 ~/.ssh
- echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa - echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh -tt centos@13.251.192.208 "cd $root_path/dev/$repo_folder && docker-compose -f docker-compose.yml -p xxx_rmsv2_api_container down"
- ssh -tt centos@13.251.192.208 "sudo rm -rf $root_path/dev" - ssh -tt centos@13.251.192.208 "sudo rm -rf $root_path/dev"
...@@ -130,7 +132,7 @@ build_sit: ...@@ -130,7 +132,7 @@ build_sit:
- ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && $dockerfile_sit" - ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && $dockerfile_sit"
- ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && $testenv" - ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && $testenv"
- ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && $TIRdevINI" - ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && $TIRdevINI"
- ssh -tt centos@13.251.192.208 "docker-compose -f $root_path/sit/$repo_folder/docker-compose.yml down" - ssh -tt centos@13.251.192.208 "docker-compose -f $root_path/sit/$repo_folder/docker-compose.yml -p xxx_sit_rmsv2_api_container down"
- ssh -tt centos@13.251.192.208 "docker-compose -f $root_path/sit/$repo_folder/docker-compose.yml -p xxx_rmsv2_api_container up -d --build" - ssh -tt centos@13.251.192.208 "docker-compose -f $root_path/sit/$repo_folder/docker-compose.yml -p xxx_rmsv2_api_container up -d --build"
- ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && sudo docker-compose up --build -d" - ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && sudo docker-compose up --build -d"
- echo "building sit environment for red test ci cd" - echo "building sit environment for red test ci cd"
...@@ -158,6 +160,7 @@ clean_build_sit: ...@@ -158,6 +160,7 @@ clean_build_sit:
- chmod 700 ~/.ssh - chmod 700 ~/.ssh
- echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa - echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh -tt centos@13.251.192.208 "docker-compose -f $root_path/sit/$repo_folder/docker-compose.yml -p xxx_sit_rmsv2_api_container down"
- ssh -tt centos@13.251.192.208 "sudo rm -rf $root_path/sit" - ssh -tt centos@13.251.192.208 "sudo rm -rf $root_path/sit"
...@@ -203,4 +206,5 @@ clean_rebuild_sit: ...@@ -203,4 +206,5 @@ clean_rebuild_sit:
- chmod 700 ~/.ssh - chmod 700 ~/.ssh
- echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa - echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- ssh -tt centos@13.251.192.208 "cd $root_path/sit/$repo_folder && docker-compose -f docker-compose.yml -p xxx_sit_rmsv2_api_container down"
- ssh -tt centos@13.251.192.208 "sudo rm -rf $root_path/sit" - ssh -tt centos@13.251.192.208 "sudo rm -rf $root_path/sit"
\ No newline at end of file
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