Commit 5303a7b2 authored by John Red Medrano's avatar John Red Medrano

initial

parent 3636480f
Pipeline #282 failed
stages:
- initial_repo
- build
- cleanup_build
- clean_initial_repo
- rebuild_dev
- clean_rebuild_dev
- build_sit
- rebuild_sit
intial_dev:
initial_repo:
stage: initial_repo
image: ubuntu
rules:
- if: '$CI_COMMIT_MESSAGE =~ /initial/'
- if: '$CI_COMMIT_MESSAGE =~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: always
# except:
# variables:
......@@ -43,11 +46,27 @@ intial_dev:
- echo "Successfully build dev environment"
- echo "Closed"
buid_dev:
stage: build
clean_initial_repo:
stage: clean_initial_repo
image: ubuntu
script:
- echo "this is a clean up for clean_initial_repo"
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y)'
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa
- '[[ -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"
rules:
- if: '$CI_COMMIT_MESSAGE !~ /initial/'
- if: '$CI_COMMIT_MESSAGE =~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: on_failure
rebuild_dev:
stage: rebuild_dev
image: ubuntu
rules:
- if: '$CI_COMMIT_MESSAGE !~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: always
# only:
# refs:
......@@ -75,10 +94,11 @@ buid_dev:
- echo "Closed"
cleanup_build_dev:
stage: cleanup_build
clean_rebuild_dev:
stage: clean_rebuild_dev
image: ubuntu
script:
- echo "this is a clean up for clean_rebuild_dev"
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y)'
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
......@@ -86,13 +106,16 @@ cleanup_build_dev:
- echo "$CENTOS_SERVER" | ssh-add - > ~/.ssh/id_rsa
- '[[ -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"
rules:
- if: '$CI_COMMIT_MESSAGE =~ /initial/ && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-develop"'
when: on_failure
build sit:
stage: build
stage: build_sit
image: ubuntu
rules:
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "red-test-sit"'
......
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