Commit 4f370351 authored by John Red Medrano's avatar John Red Medrano

initial

parent 5303a7b2
...@@ -49,6 +49,9 @@ initial_repo: ...@@ -49,6 +49,9 @@ initial_repo:
clean_initial_repo: clean_initial_repo:
stage: clean_initial_repo stage: clean_initial_repo
image: ubuntu image: ubuntu
rules:
- if: '$CI_COMMIT_MESSAGE =~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: on_failure
script: script:
- echo "this is a clean up for clean_initial_repo" - echo "this is a clean up for clean_initial_repo"
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y)' - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y)'
...@@ -58,16 +61,13 @@ clean_initial_repo: ...@@ -58,16 +61,13 @@ clean_initial_repo:
- 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 "sudo rm -rf /var/www/gitlab_variable_red/dev" - ssh -tt centos@13.251.192.208 "sudo rm -rf /var/www/gitlab_variable_red/dev"
rules:
- if: '$CI_COMMIT_MESSAGE =~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: on_failure
rebuild_dev: rebuild_dev:
stage: rebuild_dev stage: rebuild_dev
image: ubuntu image: ubuntu
rules: rules:
- if: '$CI_COMMIT_MESSAGE !~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"' - if: '$CI_COMMIT_MESSAGE !~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: always when: always
# only: # only:
# refs: # refs:
# - red-develop # - red-develop
...@@ -97,6 +97,9 @@ rebuild_dev: ...@@ -97,6 +97,9 @@ rebuild_dev:
clean_rebuild_dev: clean_rebuild_dev:
stage: clean_rebuild_dev stage: clean_rebuild_dev
image: ubuntu image: ubuntu
rules:
- if: '$CI_COMMIT_MESSAGE =~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
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"
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y)' - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y)'
...@@ -106,9 +109,7 @@ clean_rebuild_dev: ...@@ -106,9 +109,7 @@ clean_rebuild_dev:
- 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 "sudo rm -rf /var/www/gitlab_variable_red/dev" - ssh -tt centos@13.251.192.208 "sudo rm -rf /var/www/gitlab_variable_red/dev"
rules:
- if: '$CI_COMMIT_MESSAGE =~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: on_failure
......
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