Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stages:
- - test
- - deploy
- unit_test:
- image: tholum/slim_fullstack:latest
- stage: test
- before_script:
- - /etc/init.d/mysql start
- - cp /scripts/files/* class/
- script:
- - /usr/bin/phpunit --coverage-text --colors=never
- after_script:
- - /etc/init.d/mysql stop
- deploy_review:
- image: tholum/ansiblerunner
- stage: deploy
- before_script:
- - mkdir -p /root/.ssh
- - echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa
- - echo "$SSH_PUBLIC_KEY" > /root/.ssh/id_rsa.pub
- - echo "Host *" > /root/.ssh/config
- - echo " StrictHostKeyChecking no" >> /root/.ssh/config
- - chmod -R 600 /root/.ssh
- script:
- - cd /opt
- - git clone <My Ansible Repo>
- - cd ansible
- - echo "<Some Host> slim_branch=review slim_path=/var/www/html" > hosts-reviews
- - ansible-playbook -i hosts-reviews deployReview.yml
- only:
- - review
- deploy_master:
- image: tholum/ansiblerunner
- stage: deploy
- before_script:
- - mkdir -p /root/.ssh
- - echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa
- - echo "$SSH_PUBLIC_KEY" > /root/.ssh/id_rsa.pub
- - echo "Host *" > /root/.ssh/config
- - echo " StrictHostKeyChecking no" >> /root/.ssh/config
- - chmod -R 600 /root/.ssh
- script:
- - cd /opt
- - git clone <My Ansible Repo>
- - cd ansible
- - ansible-playbook -i hosts-production-servers deployMaster.yml
- only:
- - master
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement