Skip to content
Snippets Groups Projects
Commit 06502f40 authored by Soeren Peters's avatar Soeren Peters
Browse files

Add CI gcov deploy job with corresponding ansible playbook.

parent dfa320da
No related branches found
No related tags found
No related merge requests found
......@@ -252,3 +252,21 @@ gcov:
- coverage/
reports:
cobertura: coverage/coverage.xml
deploy_gcov_to_elladan:
stage: deploy
needs: ["gcov"]
before_script:
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
- apt-get install -y rsync
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_ELLADAN" | tr -d '\r' | ssh-add -
- ssh-keyscan -t rsa elladan.irmb.bau.tu-bs.de >> ~/.ssh/known_hosts
- pip3 install ansible
script:
- ansible-playbook -i ansible/hosts.cfg -u public_pages ansible/playbook_gcov.yml
\ No newline at end of file
......@@ -4,3 +4,5 @@ host_key_checking=False
phoenix.hlr.rz.tu-bs.de ansible_ssh_private_key_file=./private_key
[gitlab_ci_deploy_cppcheck]
elladan.irmb.bau.tu-bs.de
[gitlab_ci_deploy_gcov]
elladan.irmb.bau.tu-bs.de
\ No newline at end of file
- hosts: gitlab_ci_deploy_gcov
tasks:
- name: Create remote gcov dir
command: mkdir ~/coverage
ignore_errors: yes
- name: Synchronize gcov with remote
synchronize:
src: "../coverage"
dest: "~/coverage/html_report"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment